asp.net 找不到默认角色提供程序
本文关键字:程序 角色 默认 net 找不到 asp | 更新日期: 2023-09-27 18:30:53
在我的 web 配置文件中,我写了这段代码
<roleManager enabled="true" defaultProvider="AspNetSqlRoleProvider">
<providers>
<clear/>
<add connectionStringName="ApplicationServices" applicationName="/AltuaWebsite" name="AspNetSqlRoleProvider" type="System.Web.Security.SqlRoleProvider"/>
<add applicationName="/AltuaWebsite" name="AspNetWindowsTokenRoleProvider" type="System.Web.Security.WindowsTokenRoleProvider"/>
</providers>
</roleManager>
我收到此错误
说明:处理 处理此请求所需的配置文件。请查看 下面的特定错误详细信息并修改您的配置文件 适当地。
分析器错误消息:连接名称"应用程序服务"是 在应用程序配置或连接字符串中找不到 为空。
有人知道问题是什么吗?
错误指出没有名为 ApplicationServices
的连接。
您需要将其添加到web.config
中,例如:
<connectionStrings>
<add name="ApplicationServices"
connectionString="[connection info here]" providerName="System.Data.SqlClient" />
</connectionStrings>