ASP on Windows 2016. Connection to DB Oracle raises error 3706 - Provider cannot be found

mr anto 1 Reputation point

I am migrating an old ASP (vbscript) application from a Windows 2003 server into a Windows 2016 64Bit server, where DB Oracle 18.0 is also installed.
Application uses ORAOLEDB.ORACLE provider to connect to DB. This is the code snippet used to get connection

Dim con, rs
set con = CreateObject("ADODB.Connection") =";user id=xxx;password=yyy;data source=MyDB"
if err.number <> 0 then
    response.write "error<br>" & err.number & " - " & err.Description 
    response.write "connessione aperta"
end if
set rs = createobject("adodb.recordset") "select count(*) as cnt from tgmi014 where yea=2020",con
response.write "found " & rs.fields(0).value & " items"
set rs=nothing
set con=nothing

when executing con.Open, application crashes returning the above error message (3706 Provider cannot be found. It may not be properly installed)

Im sure TNSNAMES.ORA is correctly configured; in fact I can connect to DB via SQLPlus. I also tried to install ODAC 19.3 64Bit driver, and after registering ORAOLEDB19.DLL, ODAC connects to DB.

I also copied code snippet into a testdbconn.vbs file, and executed "cscript.exe testdbconn.vbs" from dos shell, getting the expected output.

Despite of all, ASP page fails. In IIS, I set Application Pools enabled to run 32Bit applications, but every test was unsuccessful.

ASP code was working on old Windows2003 server, whereas no ODAC was installed, so I suppose theres something on IIS to be set for it to work on Windows2016. How can I fix it?

thanks for help

Internet Information Services
A set of technologies in the .NET Framework for building web applications and XML web services.
3,240 questions
{count} votes

2 answers

Sort by: Most helpful
  1. Bruce ( 54,711 Reputation points

  2. Bruce ( 54,711 Reputation points

    you are using the com based adodb driver. see:

    0 comments No comments