I have a problem trying to establish a connection to a SQL server database from an ASP classic, the web server (windows 2003) and the database server (SQL server 2000 SP3) are in the same machine, the code I use to establish the connection is something like this:
sist Security Info=true;User ID=userid;Initial Catalog=databasename;Data Source=servername”
When I run the application appears the following error message
Microsoft OLE DB Provider for SQL Server error '80004005'
[DBNETLIB][ConnectionOpen (Connect()).]SQL Server does not exist or access denied.
/testsite/testpage.asp, line 14
I found the following Microsoft KB article http://support.microsoft.com/default.aspx?scid=kb%3Ben-us%3B328306
, but nothing there helps.
I think the error is related to IUSR_MACHINENAME or IIS permissions, because the following.
• When I change the connection to another database server a similar error occurs.
• I have tried changing the connection string to use ODBC and the error remains.
• I wrote a sample page with the same code in a client-side script, and run it in the server console and it works ok.
• The error occurs only in that web server, if I change the application to another web server it works fine, even if it uses the same database server.
• The ASP .NET sites in the same server are OK.