开发者

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

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 w开发者_JAVA技巧eb.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?


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 :)


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)

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜