views:

917

answers:

3

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 ?

A: 

Check your tnsnames file. More description of that error here.

JP Alioto
A: 

Hello, I have the same problem, even I found that it works fine when I use windows application and connecting to Oracle but in Webapplication it doesn't work, could you find the solution?

Sara
A: 

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.

hminaya
Especially if you might have 32bit and 64 bit clients.
Gary