+entityForName: nil is not a legal NSManagedObjectContext parameter searching for entity name ‘Account”

– (NSManagedObjectContext *)managedObjectContext { if (managedObjectContext != nil) return managedObjectContext; NSPersistentStoreCoordinator *coordinator = [self persistentStoreCoordinator]; if (coordinator != nil) { managedObjectContext = [[NSManagedObjectContext alloc] init]; [managedObjectContext setPersistentStoreCoordinator:coordinator]; } return managedObjectContext; } You haven’t provided a lazy loading implementation of persistentStoreCoordinator so coordinator will always be nil so you will always be returning nil from this … Read more

Sharing ASP.NET cookies across sub-domains

Set the property of Domain to .mydomain.example in each Cookies of two subdomains websites. Like: Response.Cookies[“test”].Value = “some value”; Response.Cookies[“test”].Domain = “.mysite.example”; In Site A: HttpCookie hc = new HttpCookie(“strName”, “value”); hc.Domain = “.mydomain.example”; // must start with “.” hc.Expires = DateTime.Now.AddMonths(3); HttpContext.Current.Response.Cookies.Add(hc); In Site B: HttpContext.Current.Request.Cookies[“strName”].Value

AuthenticateRequest event

It seems that the FormsAuthenticationModule gets handled first. This module is normally earlier than any custom module in the ASP.NET pipeline, so when AuthenticateRequest is fired, FormsAuthenticationModule will get called first, do its job and then your module’s event handler will be called. If you really want to dig deep into this, I suggest trying … Read more

The HTTP request is unauthorized with client authentication scheme ‘Ntlm’ The authentication header received from the server was ‘NTLM’

Visual Studio 2005 Create a new console application project in Visual Studio Add a “Web Reference” to the Lists.asmx web service. Your URL will probably look like: http://servername/sites/SiteCollection/SubSite/_vti_bin/Lists.asmx I named my web reference: ListsWebService Write the code in program.cs (I have an Issues list here) Here is the code. using System; using System.Collections.Generic; using System.Text; … Read more