asp.net - 您在 ASP.NET 网站管理工具上选择的数据存储存在问题

标签 asp.net

使用网站管理工具,它总是给数据库错误。

<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/

相关文章:

asp.net - 向 ListItem 添加属性,而不是呈现样式

asp.net - 通过按钮命令由服务器端调用客户端

c# - 如何最小化 ASP.NET C# 项目 DLL 的大小?

.net - asp.net 应用程序的最终用户是否需要安装 .net

c# - 文本框值将显示其他文本框信息,无需单击按钮

c# - 来自 Gridview 中 UserControl 的事件未被触发

c# - 如何在 Gridview 页脚中添加 2 行

asp.net - 使用 Entity Framework 创建具有多个查询的 MVC ViewModel

asp.net - 使用 IIS 的 ASP.NET WebAPI 如何存储我的用户身份验证状态?

c# - Remove() 不适用于多对多关系(ASP.NET、lambda 表达式)