4

Can someone explain why when I have this in my web.config:

<add key="webpages:Enabled" value="true" /> 

I get this error pointing at my custom membership provider:

The pre-application start initialization method Start on type 
System.Web.WebPages.Deployment.PreApplicationStartCode

Also, I never added that entry to my web.config; Visual Studio must have done it for me when I added .cshtml file to my web form project. Supposedly that entry tells asp.net not to render .cshtml files?

Kyle Trauberman
  • 25,414
  • 13
  • 85
  • 121
Aaron Barker
  • 706
  • 7
  • 14

2 Answers2

1

This can occur when you add a razor page to an existing ASP.NET Project. Just remove the line and it will work fine again :)

Dylan Slabbinck
  • 846
  • 1
  • 16
  • 27
0

This line also caused my LoginUrl to fall back to it's original value "/Account/Login" instead of taking a value from FormsAuthentication settings.

(Just in case anyone has the same problem)

To Ka
  • 640
  • 8
  • 24