使用网站管理工具,它总是给数据库错误。
<membership>
<providers>
<remove name="AspNetSqlMembershipProvider"/>
<add name="FTESqlMembershipProvider"
type="System.Web.Security.SqlMembershipProvider, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"
connectionStringName="FTEDashBoard.ConnectionString"
enablePasswordRetrieval="false"
enablePasswordReset="true"
requiresQuestionAndAnswer="true"
applicationName="/" requiresUniqueEmail="false"
passwordFormat="Hashed" maxInvalidPasswordAttempts="5"
minRequiredPasswordLength="7" minRequiredNonalphanumericCharacters="1"
passwordAttemptWindow="10" passwordStrengthRegularExpression=""/>
</providers>
</membership>
<roleManager>
<providers>
<remove name="AspNetSqlRoleProvider"/>
<add name="FTESqlRoleProvider" connectionStringName="FTEDashBoard.ConnectionString"
applicationName="/"
type="System.Web.Security.SqlRoleProvider, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"/>
</providers>
</roleManager>
它给了我这个错误:
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: Object reference not set to an instance of an object. and when i want to choose datatsource is giving me The following message may help in diagnosing the problem: Object reference not set to an instance of an object. at ASP.providers_chooseprovidermanagement_aspx.Page_Load() in c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\ASP.NETWebAdminFiles\Providers\chooseProviderManagement.aspx:line 13 at System.Web.Util.CalliHelper.ArglessFunctionCaller(IntPtr fp, Object o) 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
我真的不知道为什么在工具中它无法访问数据库..我在 web.config 中的连接字符串是
<connectionStrings>
<add name="FTEDashBoard.ConnectionString" connectionString="Data Source=logsuatsql01;Initial Catalog=CMNBS;Persist Security Info=True;User ID=FTEDashboard;Password=dashbrdFte!@#;Max Pool Size=500;AttachDBFilename=|DataDirectory|aspnetdb.mdf;Connect Timeout=600"/>
</connectionStrings>
最佳答案
我也遇到了这个问题。我发现我所要做的就是重建我的解决方案。
希望有帮助!
关于asp.net - 您在 ASP.NET 网站管理工具上选择的数据存储存在问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/5541868/