ASP.NET MVC3 Parser Error Message: This method cannot be called during the application's pre-start initialization stage.

After upgrading to MVC3 I recieved the below error: 
Parser Error Message: This method cannot be called during the application's pre-start initialization stage.
This occured becuase I was using a custom membership provider:
<add name="MyMembershipProvider" ....
(Entry in web.config)To resolve, I added the following to the web.config:
<add key="enableSimpleMembership" value="false"/>
<add key="autoFormsAuthentication" value="false"/>
 The reason - security and membership settings are now defaulted so you need to override them. 
 
Comments are closed