To solve this problem, your fix may be listed here http://go.microsoft.com/fwlink/?LinkId=256588 as described in the exception, but it didn’t help me.
Even though I had two DbContext classes, consolidating those did not help.
My actual problem was that
- I had renamed the “DefaultConnection” connection string entirely from the project, preferring it to live in my own named connection.
- I had changed this in all DbContext classes.
- But I hadn’t and hadn’t changed the line of code in the \Filters\InitializeSimpleMembershipAttribute.cs class to match.
Of course, rather than just replacing the string – I did what a proper programmer should do. I made a constant (or you can expose it as a property of a class).