Last post Apr 25, 2017 09:44 PM by lannie
Apr 25, 2017 03:05 AM|Ravi Sher Singh|LINK
Hello Team @ Microsoft,
We are facing a very strange problem while we are trying to host an application over IIS. Let me explain this below :
There is an application server where we are developing and deploying an ASP.NET application and a database server from where we will be fetching and dumping data from and to the database respectively.
The Application Server configurations are as follows :
The Database Server configurations are as follows :
Now, we have configured the TNS entry of the client as per the details of the oracle server. When we run the code using (Cassini) in Visual Studio, the application is running properly without throwing any error. However, when we try to publish the
website from Visual Studio and do a web deployment through IIS, the application page opens. However, during login, it fails. We have made several breakpoints to understand the problem. We could see that it failed when we called Open method of OracleConnection
We are not able to understand why system is able to create connection to database when running with in Visual Studio but failed when deployed to IIS. I have check in both cases system is using same connection string with valid credentials.
Can you please help us into this?
Apr 25, 2017 08:58 AM|PatriceSc|LINK
Detailed but the very first information that would help is the error message you have. You likely have multiple messages depending on what goes wrong during the initial connection and it would likely help someone familiar with Oracle (I'm using SQL Server)
to narrow down the problem.
Else for now it is just anything that could happen and we can just guess some kind of configuration or firewall issue. Please never post about an error without telling what it is exactly...
Apr 25, 2017 10:44 AM|Ravi Sher Singh|LINK
The following is the code which opens connection with the Oracle Database.
When this is executed, an exception is thrown with the following details :
Hope this helps.
Apr 25, 2017 11:13 AM|PatriceSc|LINK
So it seems an Oracle level error and the numeric error translates to 80004005. Try perhaps
Is this expected to have ?
Oracle Database Client (22.214.171.124.0) for Microsoft Windows (x64)
32 bit ODAC (Oracle Data Access Components)12c Release 1
The rule is that if a process is 64 bit (you could use
https://msdn.microsoft.com/en-us/library/system.environment.is64bitprocess(v=vs.110).aspx) then DLLs loaded by this process should be x64 as well...
Apr 25, 2017 09:44 PM|Lannie|LINK
If you are using the 32-bit ODAC then you must install the 12cR1 32-bit client in a separate ORACLE HOME from your 64-bit client in the same Oracle Base directory.
IIS must have 32-bit enabled (can't remember where that setting is)
the application must be compiled explicitly 32-bit.
The 32-bit ODAC client can communicate just fine with the 64-bit remote database server.
it is good idea in application ENVIRONMENT to set up the ENVIRONMENT PARAMETERS FOR: ORACLE_BASE directory, ORACLE_HOME to your 32-bit Oracle Home, and in PATH have the Oracle 32-bit client FIRST.
If you are working in NON-FIPS-140 enabled world, you can look into the Oracle MANAGED driver which is both 32-bit and 64-bit aware, not dependent on the GAC, AND has the Oracle Client built IN. No Oracle client installation required. The CONFIG and IMPORTS
statements are different, but all the CODE behind PAGE is the same.