自从我把我的 MVC 项目运行时,我总是遇到错误
此代码在我的 web.config
上文件。
<roleManager defaultProvider="CustomRoleProvider" enabled="true" cacheRolesInCookie="false">
<providers>
<clear />
<add name="CustomRoleProvider" type="SM.MyRoleProvider" />
</providers>
</roleManager>
这就是我的错误:
配置错误
Description: An error occurred during the processing of a configuration file required to service this request. Please review the specific error details below and modify your configuration file appropriately.
Parser Error Message: This method cannot be called during the application's pre-start initialization phase.
请问有人能告诉我这是怎么回事吗?
最佳答案
嗨,您必须进入视觉工作室并进入路径:
网站选项卡 -> ASP.NET 配置 -> 安全选项卡 -> 禁用角色
关于asp.net-mvc - 使用 MVC 错误配置 roleManager 提供程序,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/29506375/