PC Review
Forums
Newsgroups
Microsoft DotNet
Microsoft ADO .NET
Cannot open database requested in login <DBName>. Login fails.
Forums
Newsgroups
Microsoft DotNet
Microsoft ADO .NET
Cannot open database requested in login <DBName>. Login fails.
![]() |
Cannot open database requested in login <DBName>. Login fails. |
|
|
Thread Tools | Rate Thread |
|
|
#1 |
|
Guest
Posts: n/a
|
Hi
I have 1 web service posting data to a SQL server 2000 database and a separate ASP.NET web site reading data from the same database. Both use the same SQL user and password to connect to SQL. The web service is windows authenticated for a single user and has impersonate set to true. (It needs this for security to a COM component). When attempting to post data to SQL from the web service I get the following error: Cannot open database requested in login <DBName>. Login fails. The ASP.NET web reports data off the database. It uses anonymous access and connects with the same SQL user account. The web can access the data without any problem. The SQL user has been placed db_owner role of the database. The NT account has the same name as the SQL account except with the domain qualifier prepended. ie. SQL - user1 NT - MYDOMAIN\user1 Does anyone know why the user credentials would consistantly fail on the web service and consistantly work on the ASP.NET site. Both are hosted on the same web server (Win2k3). Thanks in advance |
|
|
|
#2 |
|
Guest
Posts: n/a
|
On Mon, 6 Feb 2006 23:36:13 -0800, "AL" <AL@discussions.microsoft.com> wrote:
¤ Hi ¤ ¤ I have 1 web service posting data to a SQL server 2000 database and a ¤ separate ASP.NET web site reading data from the same database. Both use the ¤ same SQL user and password to connect to SQL. The web service is windows ¤ authenticated for a single user and has impersonate set to true. (It needs ¤ this for security to a COM component). ¤ ¤ When attempting to post data to SQL from the web service I get the following ¤ error: ¤ ¤ Cannot open database requested in login <DBName>. Login fails. ¤ ¤ The ASP.NET web reports data off the database. It uses anonymous access and ¤ connects with the same SQL user account. The web can access the data without ¤ any problem. ¤ ¤ The SQL user has been placed db_owner role of the database. ¤ ¤ The NT account has the same name as the SQL account except with the domain ¤ qualifier prepended. ie. ¤ ¤ SQL - user1 ¤ NT - MYDOMAIN\user1 ¤ ¤ Does anyone know why the user credentials would consistantly fail on the web ¤ service and consistantly work on the ASP.NET site. Both are hosted on the ¤ same web server (Win2k3). So if I understand your description correctly, are you using SQL Server authentication all around and that is reflected in the connection string for both the ASP.NET app and web service? Paul ~~~~ Microsoft MVP (Visual Basic) |
|
![]() |
|
| Thread Tools | |
| Rate This Thread | |
|
|

Main Page 

