IIS 7 and Above
Classic ASP not connecting to Oracle Database
Last post Feb 11, 2019 08:45 AM by JSIM1904
Feb 05, 2019 02:00 PM|JSIM1904|LINK
I was wondering if anyone would be able to assist. We've recently upgraded our website runs on classic ASP onto a Windows Server 2016 Standard (IIS version 10.0). It then connects to a separate Oracle database in order to do an address lookup. However since
moving it onto the new Application server, it does not complete and just hangs.
This is unusual as we have installed the Oracle ODBC drivers and have made sure the tnsnames.ora file is included in the file path.
When we connect to the database using either Oracle ODBC driver configuration, SQL+ or the tnsping command, we are able to successfully connect and a check of the database server shows the connection being received.
However when we try to connect via the website on the server, the website hangs when connecting. We get no error messages and it requires a refresh of the app pools in order to use the website again.
The ASP script relating to this is:
set dbConn = server.createobject("adodb.connection")
dbConn.open "Provider=OraOLEDB.Oracle;User ID=USERNAME;Password=PASSWORD;Server=SERVER;Data Source=DS;"
set CreateConnection = dbConn
Would anyone have ideas what may be causing this? I've looked at previous posts similar to this but all the fixes it mentions we've tried and no joy.
Thanks in advance,
Feb 06, 2019 02:20 AM|Jalpa Panchal|LINK
Check that you enable 32bit application pool is true in advance application pool setting.You need to use Oracle 32bit component and DSN 32bit to connect to Oracle database from Asp script.
Confirm that you connection string is right and it connect the database or not.
Feb 11, 2019 08:45 AM|JSIM1904|LINK
Thank you for this. We have confirmed that 32 bit applications are enabled and that the connection string is correct. Interestingly on our old 2008 server the 32 bit which we are upgrading, this is set to false and still works.
Also we've been doing further investigations and we've managed to get it working. It seems the key to getting it to work on our new server was to change the Load User Profile setting to True on the Application Pool in advanced settings within IIS. We're
not sure why this fixes it as on the old server, this value is set to false, but it does at least work now.