R – Windows 2008 x64 – WCF IIS – OracleException ORA-12154: TNS:could not resolve the connect identifier specified

iisora-12154oraclewcfwindows-server-2008

I have WCF service is hosted in IIS on a Windows 2008 x64 machine. This WCF service needs to access an Oracle database but when it tries to do so it encounters an OracleException with the following error message:

ORA-12154: TNS:could not resolve the connect identifier specified

I tried to test the connection to the Oracle database using a Universal Data Link (UDL) file and that works fine. May I assume that the Oracle client is correctly installed on my Windows 2009 server ? If so, what else could be the problem ?

Best Solution

Try using a TNSPING to your oracle server, that will tell you if the connection can be established.

Also check if you have multiple Oracle Clients installed on that machine.

Related Question