简体   繁体   English

无法连接到ASP.NET网站管理工具中的SQL Server数据库

[英]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.

相关问题 网站管理工具:无法连接到 SQL Server 数据库(使用 SQL Server 开发版) - Web Site Administration Tool: Unable to connect to SQL Server database (using SQL Server Development Edition) 无法连接到ASP.NET Web管理工具中的SQL Server数据库 - Unable to connect to SQL Server database in ASP.NET Web Admin Tool IIS中是否有ASP.NET网站管理工具? - Is there a ASP.NET web site administration tool in IIS? ASP.Net网站管理工具:无法建立与数据库的连接 - ASP.Net Web Site Administration Tool: Could not establish a connection to the database ASP.Net网站管理工具“安全性”选项卡错误。 无法访问的寄存器:安全性 - ASP.Net Web Site Administration Tool Security tab error. Inaccessible registers: Security 缺少ASP.NET网站管理工具访问规则按钮 - ASP.NET Web Site Administration Tool Access Rule button is missing 通过ASP.NET网站管理工具列出和管理网页上的用户 - List and manage users on webpage from ASP.NET Web Site Administration Tool “无法连接到SQL Server数据库”-ASP.NET配置 - “Unable to connect to SQL Server database” - ASP.NET configuration 无法连接到SQL Server数据库(ASP.NET C#) - Unable to connect to SQL Server Database (ASP.NET C#) 为asp.net运行Web管理工具时出错 - Error running web administration tool for asp.net
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM