Asp.net 无法连接到网站管理工具中的数据库
我想使用ASPX.NET中的角色和成员资格提供程序。因此,当我想使用网站管理工具添加规则时,我遇到以下错误:Asp.net 无法连接到网站管理工具中的数据库,asp.net,asp.net-membership,Asp.net,Asp.net Membership,我想使用ASPX.NET中的角色和成员资格提供程序。因此,当我想使用网站管理工具添加规则时,我遇到以下错误: The following message may help in diagnosing the problem: Unable to connect to SQL Server database. at System.Web.Administration.WebAdminPage.CallWebAdminHelperMethod(Boolean isMembership,
The following message may help in diagnosing the problem: Unable to connect to SQL
Server database. at
System.Web.Administration.WebAdminPage.CallWebAdminHelperMethod(Boolean isMembership,
String methodName, Object[] parameters, Type[] paramTypes) at
ASP.security_users_manageusers_aspx.Page_Load() at
System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e) at
System.Web.UI.Control.OnLoad(EventArgs e) at System.Web.UI.Control.LoadRecursive() at
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean
includeStagesAfterAsyncPoint)
我设置了connectionstring,您可以在这里看到:
<membership defaultProvider="AspNetSqlMembershipProvider">
<providers> <clear />
<add name="AspNetSqlMembershipProvider" type="System.Web.Security.SqlMembershipProvider" connectionStringName="authentication" />
问题是什么
致意
无法连接到SQL Server数据库
信息说明了一切。您无法连接到SQL server的原因有很多
首先要检查的是使用SSMS登录到SQL Server
通常,在web.config中应该有这样的连接字符串
<connectionStrings>
<remove name="authentication" />
<add name="authentication" connectionString="Data Source=192.168.1.100;Initial Catalog=DATABASE_NAME;Persist Security Info=True;User ID=DATABASE_USERID;Password=DATABASE_PASSWORD;MultipleActiveResultSets=True" providerName="System.Data.SqlClient" />
</connectionStrings>
是示例连接字符串