简体   繁体   中英

asp.net application not connecting to oracle 11g even after installing oracle instant client for 11g

I have a asp.net mvc application which is using oracle 11g database. In development machine every thing worked fine, but while deploying it in production server asp.net application is not able to connect to the database server. It is always throwing an empty exception.

I wrote also a simple console application to test the db connectivity. It is also not working. Then I realized it is because that the machine doesn't have a oracle client installed. so I installed Oracle instant client for 11g database 32 bit version. After this the console application started working but the web application still could not connect.

I google lot and finally decided to analyse using process monitor. In process monitor I found that the web application (iis) is looking for an oraclient12.dll.

This oraclient12.dll is part of oracle client for 12c database. I can't understand why it is looking for this dll.

在此处输入图片说明

After installing oracle database client for 12g, the above issue with oraclient12.dll got fixed. but iis is now not able to locate oraclsce12.dll. I searched the whole file-system for this file but could not find.

does anyone know what should i install to get oraclsce12.dll.

在此处输入图片说明

Thanks, Sujith

I was facing similar issue, then came to know that for the dll to be installed you should now also install the option «Oracle Advanced Security», , by choosing custom installation when installing the oracle 12 client. I did the same and my issue got resolved. You can try this and see if your issue gets resolved.

thanks Sudharsan

This is documented as Oracle bug 17379890 .

Oracle provides two workarounds:

Workarounds include:

To avoid the issue in the first place, explicitly select "Oracle NET" component during install

After the fact, you can

  1. do another custom install into the same home, and select "Oracle NET"
  2. copying ORACLSCE12.DLL from an existing install into OH\\bin also resolves the issue.

However, making a single copy of file ORACLSCE12.DLL is not sufficient because there are more files which are missing. The workaround works only for certain applications. For example for tnsping.exe you still get an error due to missing files.

You have to take the first solution, ie explicitly select "Oracle NET" component during install

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM