Re: SQL Server Login Failed from ASP
From: John Bell (jrm_bell@hotmail.com)
Date: 12/30/02
- Next message: Tom Kaminski [MVP]: "Re: SQL Server Login Failed from ASP"
- Previous message: vara: "SQL Server Login Failed from ASP"
- In reply to: vara: "SQL Server Login Failed from ASP"
- Next in thread: Tom Kaminski [MVP]: "Re: SQL Server Login Failed from ASP"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
From: "John Bell" <jrm_bell@hotmail.com> Date: Mon, 30 Dec 2002 19:52:20 -0000
Hi
Did you check the DSN worked through control panel or administartive tools?
How did you move the database? If you used backup/restore or
detached/attached then you may need to fix the users using
sp_change_users_login.
John
"vara" <vara@maineguide.com> wrote in message
news:b4ee9629.0212301126.1fd0b04b@posting.google.com...
> We recently moved SQL Server 2000 to another machine keeping IIS-5.0
> on old machine. Both are on W2K. I am using ODBC system DSNs to point
> new database. When I tried to test one of my ASP page I got this
> problem.
>
> Microsoft OLE DB Provider for ODBC Drivers error '80004005'
>
> [Microsoft][ODBC SQL Server Driver][SQL Server]Cannot open database
> requested in login 'DataBaseX'. Login fails.
>
> /ASPPage.asp, line 11
>
> My code looks like:
>
> set cn = server.CreateObject("ADODB.Connection")
> cn.ConnectionString="DSN=dsnX"
> cn.Open
>
> When I saw on the SQL server only dbo user is assigned to 'DataBaseX'
> database.
> If I write this same code in a VB component then it works fine. I
> don't understand why this is not working from a ASP page
>
> I have tried to assign IUSR_Machine to SQL server database, but no
> luck. But when I give NT Authority\Anonymous Login then it works from
> both VB and ASP. My manager don't wants to give NT Authority\Anonymous
> Login access to databases for security reasons. (this is not safe?)
- Next message: Tom Kaminski [MVP]: "Re: SQL Server Login Failed from ASP"
- Previous message: vara: "SQL Server Login Failed from ASP"
- In reply to: vara: "SQL Server Login Failed from ASP"
- Next in thread: Tom Kaminski [MVP]: "Re: SQL Server Login Failed from ASP"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Relevant Pages
|