title: Oracle ORA-12154 error on local IIS, but not with Visual Studio Development Server
body: <p>I've got an ASP.NET application that can connect to Oracle when it's started by Visual Studio Development Server, but when I deploy it to my local IIS, it does not connect, showing the "ORA-12154: TNS:could not resolve the connect identifier specified" error.</p>
  
  <p>My connection string was:</p>
  
  <pre><code>Data Source=ABC; User Id=USER; Password=PASSWORD;
  </code></pre>
  
  <p>Tt's using TNS. My tnsnames.ora is located at C:\oracle\instantclient_10_2\network\admin, and my ORACLE_HOME system variable is pointing to C:\oracle\instantclient_10_2.</p>
  
  <p>To make it work, I changed the connection string to:</p>
  
  <pre><code>"SERVER=(DESCRIPTION =(ADDRESS_LIST =(ADDRESS = (PROTOCOL = TCP)(HOST = server1.theplaceiwork.com)(PORT = 1521))(ADDRESS = (PROTOCOL = TCP)(HOST = server2.theplaceiwork.com)(PORT = 1521))(LOAD_BALANCE = yes))(CONNECT_DATA =(SERVER = DEDICATED)(SERVICE_NAME = ABC)(FAILOVER_MODE =(TYPE = SELECT)(METHOD = BASIC))));uid=USER;pwd=PASSWORD;"
  </code></pre>
  
  <p>So TNS is used no longer.</p>
  
  <p>But I'd like to know why I can connect using TNS while debbuging with Visual Studio, but when using IIS I can't.</p>
  
  <p>Any tips?</p>
  
  <p>PS. I can use SqlDeveloper with TNS showing no connection errors.</p>
  
  <p>Thanks</p>