title: Connection not opening in visual studio
body: <p>For my C# application i need to connect with oracle database. I have always used the same connection and it worked perfect with other applications. Added the same reference i always used: Oracle.DataAcces</p>
  <p>This here is the problem and i dont know how to fix it.</p>
  <blockquote>
  <p>An exception of type 'Oracle.DataAccess.Client.OracleException' occurred in Monime_V2.0.dll but was not handled in user code</p>
  <p>Additional information: External component has thrown an exception.</p>
  </blockquote>
  <p>This is what i use to connect:</p>
  <pre><code>using System;
  using System.Collections.Generic;
  using System.Linq;
  using System.Web;
  
  // Oracle 
  using Oracle.DataAccess.Types;
  using Oracle.DataAccess.Client;
  
  namespace Monime_V2._0
  {
      public class Database
      {
           protected OracleConnection conn;
           public OracleConnection Conn
          {
          get
          {
              return this.conn;
          }
      }
  
      public Database()
      {
          //dbconnectie
          this.conn = new OracleConnection();
          string pcn = &quot;dbi284945&quot;; //login
          string pw = &quot;HGD7dh8daa&quot;; //password
          this.conn.ConnectionString = &quot;User Id=&quot; + pcn + &quot;;Password=&quot; + pw + &quot;;Data Source=&quot; + &quot;//192.168.15.50:1521/fhictora&quot; + &quot;;&quot;;
      }
  </code></pre>
  <p>Here goes it all wrong:</p>
  <pre><code>private List&lt;Account&gt; GetListAccounts()
      {
          List&lt;Account&gt; listA = new List&lt;Account&gt;();
  
          string sql = &quot;select * from MT_ACCOUNT&quot;;
          OracleCommand cmd = new OracleCommand(sql, this.conn);
  
          try
          {
              this.conn.Open(); // &lt;-- This line of code sends me to the exception catcher
              OracleDataReader reader = cmd.ExecuteReader();
  </code></pre>