title: ORA-12154: TNS:could not resolve the connect identifier specified (Oracle, ASP,Net, Dapper)
body: <p>I can't find the exact issue I have on here or anywhere.</p>
  
  <p>I have an ASP.Net MVC WebApi (MVC 5.1.0, Framework 4.5.1) project that uses <strong>Oracle.DataAccess</strong>.  It runs on the local IIS server via a URL that's in my hosts file. It has a connection string connecting to an Oracle database. It works fine.</p>
  
  <p>I have a 'normal' ASP.Net MVC (MVC 5.2.2, Framework 4.5.2) project that uses <strong>Oracle.ManagedDataAccess</strong> and <strong>Dapper</strong>. It runs on the local IIS server via a URL that's in my hosts file. It uses <strong>the SAME</strong> connection string (barring the providerName) to (attempt to) connect to an Oracle database. it <strong>does not</strong> work, throwing</p>
  
  <pre><code>ORA-12154: TNS:could not resolve the connect identifier specified
  </code></pre>
  
  <p>when I try to open the connection.</p>
  
  <pre><code>   &lt;add name="OurName" connectionString="Data Source=xxxxx_migration2;Persist Security Info=True;User ID=OurUserName;Password=thepassword;Enlist=False;Min Pool Size=10;Connection Lifetime=120;Connection Timeout=30;Incr Pool Size=5;Decr Pool Size=2;" providerName="Oracle.ManagedDataAccess.Client"/&gt;
  </code></pre>
  
  <p>TNSNames.ORA is fine [as you'd reckon given that the exact same connection string works in the other project], there are no brackets in the project file paths (a very obscure issue I found in my researches), ORACLE_HOME is pathed... I am stumped.</p>
  
  <p>I know <strong>Dapper</strong> extends the connection object - does it have any really funky weird requirements that might be causing this?</p>
  
  <p>EDIT: If I switch the 'normal' ASP.Net MVC (and connection string providerName parameter) to <strong>Oracle.DataAccess</strong>, and don't use <strong>Dapper</strong> I can connect.</p>