2

I migrated my web application from unmanaged to managed Oracle Data Provider (ODP.NET)

Oracle.DataAccess.dll => Oracle.ManagedDataAccess.dll

As the web application uses the tnsnames.ora file, and it seems the managed dll is not registry friendly, just changing the dll and renaming the references gave the ORA-12545: Network Transport: Unable to resolve connect hostname; after reading this answer I put the tnsnames.ora in the main website directory and the connection were successful.

But if remove the tnsnames from the web application folder and put the environment variable "TNS_ADMIN" at the local path, the connection does not work...

If I remove the "tnsnames.ora" file from the web application folder, add the TNS_ADMIN environment variable and the path to it (C:\oracle\product\11.2.0\client_1\Network\Admin), I then open the ProcessMonitor (as suggested in this answer), add a filter Path=>contains=> tnsnames, and reload my local web application, the processmonitor dont't find any activity on this filter, and the connection to oracle fails...

Is there a way to find out, what is the path the Oracle dll is trying to load?

serge
  • 13,940
  • 35
  • 121
  • 205
  • Did you read my answer at https://stackoverflow.com/questions/28280883/determining-location-of-relevant-tnsnames-ora-file/28283924#28283924 ? There I provided the search path and a link to *Process Monitor*. This tool shows you which file your application is trying to load. – Wernfried Domscheit Jul 02 '19 at 17:56
  • I removed the tnsnames from the web application folder, added the TNS_ADMIN environment variable and the path to it, as in the OP, then opened ProcessMonitor, added a filter path contains tnsnames, and reloaded my local web application, however the processmonitor did't find any activity on this event... – serge Jul 04 '19 at 08:45
  • Strange, according to my knowledge it should take the TNS_ADMIN variable. Did you configure TNS_ADMIN in your .net config file? You can edit the file manually or use the `OraProvCfg.exe` file in your Oracle folder. – Wernfried Domscheit Jul 04 '19 at 09:09

0 Answers0