SQL Server Login Failed from ASP

From: vara (vara@maineguide.com)
Date: 12/30/02


From: vara@maineguide.com (vara)
Date: 30 Dec 2002 11:26:46 -0800


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?)



Relevant Pages

  • Re: System Administrator Implied Permissions
    ... > sa login, it assigns it the System Administrator fixed ... > Now, given this, why does SQL Server ... in each database is always a member of the public and db_owner roles. ... Other sysadmin role members have the exact same ...
    (microsoft.public.sqlserver.security)
  • Re: No db access after publishing web site
    ... GRANT UPDATE TO ... If I detach and attach this database on a different PC (according that PC ... Cannot open database "pago" requested by the login. ... Are you detaching/attaching the SQL Server Express database correctly ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: cannot login to the db after...
    ... Jasper Smith (SQL Server MVP) ... I have created a new database, "db_1", using the "sa" ... I then created a new login, "sqluser1" and gave ...
    (microsoft.public.sqlserver.security)
  • Re: Cant view merge agent properties (trying again)
    ... In the List of Actions for the Snapshot Agent History I see this repeated: ... every single database listed. ... So, just now, I went to computername\Administrator Login ID (because it's ... On the computer running SQL Server, ...
    (microsoft.public.sqlserver.replication)
  • Re: Database security design with ASP.net and form-based authentication
    ... Since you already have forms-based security, why not use a single SQL login ... for all database access? ... data entry, guest/view only, admin, report viewer. ... so I'm using SQL Server authentication. ...
    (microsoft.public.sqlserver.security)