Groups | Blog | Home
all groups > asp.net > june 2004 >

asp.net : Cannot open database requested in login 'xyz'. Login fails.


govardhann NO[at]SPAM mastek.com
6/16/2004 10:52:42 PM
One basic ASP.NET database issue….
I have a c# app running on a iis6 on one win2k3 adv servermachine &
database on other win2k server machine…(in the same domain)

Using windows authentication in web.config. Set impersonate =true .
Connection string has Integrated security=SSPI. Logging in with my ID
which is system administrator and has rights all DBs on the sql
machine.

But still, I get this error..(even I tried putting for test purpose
the username & pw in identity tag, but still same error.)
(My app is working fine with db & iis on same machine)


Exception Type: System.Data.SqlClient.SqlException
Errors: System.Data.SqlClient.SqlErrorCollection
Class: 11
LineNumber: 0
Message: Cannot open database requested in login 'xyz'. Login fails.
Login failed for user 'XYZDomian\v-xyz'.
Number: 4060

I tried the option of using Ntwork share in a custom application pool
& giving the access rights to the network share on the sql machine.
But this too didnt work..

Any help on this is appreciated..

Thanks,
Martin Marinov
6/17/2004 10:06:29 AM
You have to allow windows authentication on the and add the aspnet account
in the database

Regards
Martin


[quoted text, click to view]

avnrao
6/17/2004 12:28:36 PM
set impersonate = false.
and give the default aspnet account (or the identity in which application
pool is running) database access.

Av.
[quoted text, click to view]

AddThis Social Bookmark Button