Quantcast
Channel: Classic ASP
Viewing all articles
Browse latest Browse all 488

Can't access remote SQL server with Classic ASP website on Windows 2019 with IIS10

$
0
0

My classic ASP websites are currently installed on a Windows 2008 server using an MSSQL database 2012 on another Windows 2008 server.  They work!

I am trying to move the websites to Windows 2019 server with IIS10 with the database remaining where it is.

On the Windows 2019 server, the websites work from within Visual Studio when they are using the default web server.  But they fail when using IIS10 with the error message "An error occurred on the server when processing the URL. Please contact the system administrator".

The code is as follows:

Dim strConnection
Set ObjConn = Server.Createobject("ADODB.Connection")
strConnection = "DSN=xxxx; Database=yyyy; UID=aaaa;PWD=bbbb;"
objConn.Open strConnection

The error is caused when I call objConn.Open strConnection.  It seems to me that the code can't connect to the database.

I've set a connection to the remote database in ODBC data sources, which test successfully but doesn't fix the problem.  I've also added the connection string to the domain in IIS in the format "Server=wwww.108;DSN=xxxx; Database=yyyy;UID=aaaa;PWD=bbbb".  But this doesn't fix it either.

What am I doing wrong?

Your help would be much appreciated.

Thanking you in anticipation.

Roger


Viewing all articles
Browse latest Browse all 488

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>