“找不到用户名”修改provider元素后

发布于 2024-09-09 00:49:52 字数 644 浏览 3 评论 0原文

我在访问 ASPNETDB.MDF 数据库时遇到问题。它实际上工作正常,直到我向网络配置添加一些代码。这是我添加的阻止我连接的代码...

    <membership defaultProvider="CustomizedProvider">
  <providers>
    <add name="CustomizedProvider"
         type="System.Web.Security.SqlMembershipProvider"
         connectionStringName="LocalSqlServer"
         applicationName="MyApp"
         minRequiredPasswordLength="5"
         minRequiredNonalphanumericCharacters="0"
     />
  </providers>
</membership>

我添加它是因为我想利用它提供的密码限制。也就是说,连接字符串的名称没有更改,代码也没有更改。但是当我尝试登录时,它告诉我找不到用户名。我应该注意到我正在使用相同的 un 和 pw,顺便说一句,它们满足这些新的约束。

这是一个 ASP.NET 4.0 应用程序

I am having trouble hitting the ASPNETDB.MDF database. It actually works fine until I add some code to the web config. This is the code I added that prevents me from connecting...

    <membership defaultProvider="CustomizedProvider">
  <providers>
    <add name="CustomizedProvider"
         type="System.Web.Security.SqlMembershipProvider"
         connectionStringName="LocalSqlServer"
         applicationName="MyApp"
         minRequiredPasswordLength="5"
         minRequiredNonalphanumericCharacters="0"
     />
  </providers>
</membership>

I added it because I wanted to take advantage of the password constraints it affords. That said, the name of the connection string hasn't changed and no code change. But when I try to log in its telling me that the username cannot be found. I should ntoe that I am using the same un and pw which, by the way, meet these new constraints.

This is an ASP.NET 4.0 application

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

夢归不見 2024-09-16 00:49:52

语法似乎没有任何问题,如果连接字符串名称正确,那么您确定应用程序名称正确吗?这应该是数据库中的应用程序名称(默认为“/”),而不是 Visual Studio 中的应用程序名称。

There doesn't seem to be anything wrong with the syntax, if the connection string name is correct then are you sure the application name is correct? This should be the application name in the database (defaults to '/') not the name of your application in visual studio.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文