[英]Unable to connect to SQL Server database in asp.net Web Site Administration Tool
When I get on the Security tab on the Web Site Administration Tool, I get this Error: 当我进入“网站管理工具”的“安全性”选项卡时,出现以下错误:
There is a problem with your selected data store. 您选择的数据存储有问题。 This can be caused by an invalid server name or credentials, or by insufficient permission.
这可能是由于无效的服务器名称或凭据或权限不足引起的。 It can also be caused by the role manager feature not being enabled.
也可能是由于未启用角色管理器功能引起的。 Click the button below to be redirected to a page where you can choose a new data store.
单击下面的按钮将重定向到页面,您可以在其中选择新的数据存储。
The following message may help in diagnosing the problem: Unable to connect to SQL Server database. 以下消息可能有助于诊断问题:无法连接到SQL Server数据库。
Here is the connectionStrings part in web.config file: 这是web.config文件中的connectionStrings部分:
<connectionStrings>
<add name="DefaultConnection" connectionString="Data Source=(LocalDB)\v11.0;AttachDbFilename=|DataDirectory|\Verkoop.mdf;Integrated Security=True" providerName="System.Data.SqlClient" />
<add name="BestellingDBContext" providerName="System.Data.SqlClient" connectionString="Data Source=(LocalDB)\v11.0;AttachDbFilename=|DataDirectory|\Verkoop.mdf;Integrated Security=True" />
</connectionStrings>
And here is the membership part: 这是成员资格部分:
<membership>
<providers>
<add connectionStringName="DefaultConnection" enablePasswordRetrieval="false"
enablePasswordReset="true" requiresQuestionAndAnswer="false"
requiresUniqueEmail="false" maxInvalidPasswordAttempts="5" minRequiredPasswordLength="6"
minRequiredNonalphanumericCharacters="0" passwordAttemptWindow="10"
applicationName="/" name="DefaultMembershipProvider" type="System.Web.Providers.DefaultMembershipProvider, System.Web.Providers, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
</providers>
</membership>
I've been searching the internet for solution for hours now, but can't find anything. 我已经在互联网上搜索解决方案已有几个小时了,但找不到任何东西。 Can somebody please help?
有人可以帮忙吗? Thanks!
谢谢!
EDIT 编辑
roleManager tag: roleManager标签:
<roleManager>
<providers>
<add connectionStringName="DefaultConnection" applicationName="/"
name="DefaultRoleProvider" type="System.Web.Providers.DefaultRoleProvider, System.Web.Providers, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
</providers>
</roleManager>
It can also be caused by the role manager feature not being enabled.
也可能是由于未启用角色管理器功能引起的。
Error message said roleManager is not enabled. 错误消息指出roleManager未启用。 Please enable it and test it again.
请启用它,然后再次测试。
<roleManager defaultProvider="DefaultRoleProvider" enabled="true">
<providers>
...
</providers>
</roleManager>
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.