Guys please help me.

I am kinda new to ASP.net

Luckily I've manage log-in using forms authentication so that i could have a customize log-in page based on my Active Directory.
Now a Problem arise. I have to connect to my SQL EXPRESS database using the log-in I use. My SQL Express is using only windows authentication, and when I try to connect to SQL i get the error..

Cannot open database "DatabaseName" requested by the login. The login failed.

here is my web.config code


  <add connectionString="LDAP://domain.com/DC=domain,DC=com" name="ADConnectionString" />
<roleManager defaultProvider="AspNetWindowsTokenRoleProvider" />
<membership defaultProvider="MyADMembershipProvider">
    <add name="MyADMembershipProvider" type="System.Web.Security.ActiveDirectoryMembershipProvider, System.Web, Version=,Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" connectionStringName="ADConnectionString" enableSearchMethods="True" attributeMapUsername="sAMAccountName" />

    <!--membership provider entry goes here-->
    <authentication mode="Forms">
  		<forms name=".ADAuthCookie" timeout="10" />

      <deny users="?" />
      <allow users="*" />
        <identity impersonate="true" />

hope you guys can help me


8 Years
Discussion Span
Last Post by Cruize_Invades

Now I see where my problem is. The SQL logins are having the format of Domain\users while the authentication I am using in my domain is using sAMAccountName that is using a different format.

hope you guys can enlighten me about this

1) Can I use Form Authentication using "DOMAIN\USER""?


This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.