Var sessionUser = aspUserCon.GetUser(.Name) If (SessionHelper.LoggedInUser(.Name) = null)ĪspNetUsersController aspUserCon = new AspNetUsersController() If (HttpContext.Current != null & != null & .IsAuthenticated) Public override void OnActionExecuting(ActionExecutingContext filterContext) Public class AuthenticationActionFilterHelper : ActionFilterAttribute Notice that for MVC and Web API there are two different sets of action filter definitions: Var response = await base.SendAsync(request, cancellationToken) HttpRequestMessage request, CancellationToken cancellationToken) Public class AuthHandler : DelegatingHandler I used attribute to tell the proper inheritance to JSON serialization. Loop Reference handling in Web API My Solution: Self referencing loop detected for property ‘your model’ with type ‘ Solution:
Software technology can be real pain in the ass!!! JSON and Self referencing loop If you get the following error:
My Notes on a painful journey to learn, make and publish a Azure hosted MVC, Sinlge-Page application, Android client app and a WebAPI working with-one another.
Make sure to enable Visual Studio integration and GAC registration during installation.Your Visual Studio target CPU 32bit or 64bit.Download the proper SQLite setup bundle based on your criteria in your environment:.For some reason existing VS project wont’t recognize the connection, well at least in my environement. Notice that the order is important, especially you should not create the Visual Studio project before the SQLite conenction in Server Explorer is established. This was a bit tricky for me but these are the steps I took for Visual Studio 2013 Community Edition. Although generic lists do offer flexibility in objects creation and management. Anyway using an Array should be more effective than using generic lists, performance wise. Not sure even now what is really going on. Something clearly is happening between two generic lists sharing the same object data.
(I’m lazy here, please forgive me :), I assume that you know arrays and how to use them as with C#) There was still some weird references going on. And no using the generic list member function ToArray() did not help either. What I did was simply to quickly fix it was to create an array instead of a generic list. Other weird behaviour was when I was trying to loop through the members in the genomes list I was able to modify the values but once I left the loop the data was all wrong again.Īnyway very weird. For starters I would only be able to access only one object which was one and the same for the entire list. This caused weird behaviour when I was trying to access a object member from the Genomes list above. Then later when I create a new list of genomes I simply just replace the current list of genomes with the new population of genomes. Something is happening in adding and getting object from the species list using existing object of same type from the genomes list. NOTICE: The baby was populated either through an algorithmic logic which took a pre-existing genome from the species list above or created a new one a crossover between two existing genomes in the species list. Genome baby = null // And do something with the baby object You access a member object inside the list and use a member setter to change a value inside the object: