ORA-12541 TNS:no listener on Oracle.DataAccess connection open
970249Oct 23 2012 — edited Oct 23 2012My WCF service uses Oracle.DataAccess.Client to connect to oracle db. It has been running successfully for a year or so using the following connectionString: OracleConnection conn = new OracleConnection(String.Format("USER ID=XXX;PASSWORD=XXX;DATA SOURCE={0}", db));
I recently got a new pc and had to re-install the Oracle client. I tried to add a new operationContract to my existing service and had to re-reference the newly-added ODAC. Suddenly, it won't connect anymore. It fails on the connection.open();
My TNSnames.ora file is in the same spot that it ever was. I even tried copying it to the project's bin directory just for grins.
TOAD works. I can tnsping my database successfully from OraHome. I can access the database using System.Data.OracleClient, but I don't want to rewrite everything in order to use a deprecated dll.
If the tnsnames is there, the paths are identified in my env variables, and the listener is running, what else should be checked? I did notice that the HKEY_LOCAL_MACHINE key for Oracle was pointing to the wrong OraHome path, but even when I modified the path it still wouldn't connect, so I put it back, afraid that I would make TOAD stop working too.
Any suggestions?