开发者

'Username cannot be found' after modifying provider element

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开发者_JAVA百科 the same un and pw which, by the way, meet these new constraints.

This is an ASP.NET 4.0 application


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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜