gpt4 book ai didi

asp.net-mvc - 使用 MVC 错误配置 roleManager 提供程序

转载 作者:行者123 更新时间:2023-12-01 06:25:20 26 4
gpt4 key购买 nike

自从我把我的 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/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com