ASP.NET: This method cannot be called during the application’s pre-start initialization stage

Add this in your web.config (in the appSettings section):

<add key="enableSimpleMembership" value="false"/>
<add key="autoFormsAuthentication" value="false"/>

EDIT:

For the ones who ask why, it is a known issue described in the mvc 3 release notes
More details here

Leave a Comment