does a custom membership provider not work? Can someone explain why when I have it in...">

Web.config <add key = "webpages: Enabled" value = "true" / "> does a custom membership provider not work?

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

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

I get this error by pointing to my custom membership provider:

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

In addition, I never added this entry to my web.config; Visual Studio must have done this for me when I added the .cshtml file to my web form project. Presumably the entry tells asp.net not to display .cshtml files?

+4
source share
2 answers

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

+1
source

This line also caused my LoginUrl to return the original value "/ Account / Login" instead of accepting the values ​​from the FormsAuthentication settings.

(Just in case someone has the same problem)

0
source

All Articles