title: oracle database connection from VS2010
body: <p>I am can successfully execute the following code on a particular web project on my local dev machine.. </p>
  
  <pre><code>      string cStr = @"data source=xxxxxxx;user id=xxxxx;password=xxxx;persist security info=false";
        using (OracleConnection oc = new OracleConnection(cStr))
        {
            oc.Open();
            oc.Close();
  
        }
  </code></pre>
  
  <p>But if I try to execute it in any other project (web, console, Test), I get the following error. </p>
  
  <p><strong>OCIEnvCreate failed with return code -1 but error message text was not available.</strong></p>
  
  <p>I have googled and looked through this site and all the answers have not helped me so far. I really need help. So please do not down vote this question.</p>
  
  <p>Here is my development machine setup...</p>
  
  <p>Windows 7 Enterprise Service Pack 1 64 bit OS</p>
  
  <p>Visual Studio 2010 Enterprise Service pack 1 IIS version 7.5</p>
  
  <p>Oracle version 11.2.0</p>
  
  <p>The working web application is targeting .net framework 4. </p>
  
  <p>thanks</p>