Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Login failed

Status
Not open for further replies.

mxo

Programmer
May 20, 2005
51
ZA
hi all please any one who can help me Iam getting this error when i try to log on my site

Thanking you in advanced

Cannot open database "ASPNETDB" requested by the login. The login failed.
Login failed for user 'NETWORK-SYHFY\IWPD_27(databasename)'.
 
either login to your database via your web.config using SQL authentication in your connection string,

Code:
    <appSettings>
        <add key="appTitle" value="My Intranet"/>
        <add key="conString" value="server=(local);database=ASPNETDB;uid=DBUser;Password=StRonGPassWordHere!" />
    </appSettings>

or grant your Domain\Domain Users a limited role within your database via the SQL server
then all you need is
Code:
<add key="conString" value="server=(local);database=ASPNETDB;trusted_connection=True;"/>
...
<system.web>
 <authentication mode="Windows"/>
 <identity impersonate="true"/>
 <authorization>
   <allow roles="Domain\Domain Users"/>
   <deny users="*"/>
 </authorization>
</system.web>

I would go with the domain users option if this is on your Intranet
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top