title: Intermittent vb.net oracle connection problem
body: <p>I am seeing a strange intermittent connection failure. My application works just fine and then starts throwing connection failure exceptions. A reset of IIS is required before the app will start working again. I've been able to trace a few of the failures back to an unexpected restart of the oracle cluster but not all of them. Has anyone else seen this problem? I've searched the web but haven't found anything.</p>
  
  <p>Client - Win2003 server, IIS running ASP.net 2.0.50727, code is VB.NET, ODBC connection via Oracle Client 10.2.0.1.0 </p>
  
  <p>Server - Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - 64bit Production on a Linux cluster.</p>
  
  <p>Failure:</p>
  
  <pre><code>Attempting connection.Open()
  FAILED connection.Open()
  Message: 
  Stack Trace: 
  at Oracle.DataAccess.Client.OracleException.HandleErrorHelper(Int32 errCode, OracleConnection conn, IntPtr opsErrCtx, OpoSqlValCtx* pOpoSqlValCtx, Object src,     String procedure) 
  at Oracle.DataAccess.Client.OracleException.HandleError(Int32 errCode, OracleConnection conn, IntPtr opsErrCtx, Object src) 
  at Oracle.DataAccess.Client.OracleConnection.Open() 
  at MABridge2._0.debug.Page_Load(Object sender, EventArgs e) in C:\Documents and Settings\xxxx\My Documents\Visual Studio     2008\Projects\xxx\debug.aspx.vb:line 19
  Closed connection
  </code></pre>
  
  <p>Code:</p>
  
  <pre><code>Imports Oracle.DataAccess.Client
  Partial Public Class debug
  Inherits System.Web.UI.Page
  
  Dim loggingstring As String
  
  Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
  
      Dim connString As New String("Data Source=xxx_rac;Persist Security Info=True;User ID=xxx;Password=xxxxx;")
      Using conn As New OracleConnection(connString)
          Dim cmd As New OracleCommand()
          Response.Write("Attempting connection.Open()" + "&lt;br&gt;")
          Try
              conn.Open()
          Catch ex As OracleException
              Response.Write("FAILED connection.Open()" + "&lt;br&gt;")
              loggingstring = "Message: " + ex.Message + "&lt;br&gt;" + "Stack Trace:" + ex.StackTrace + "&lt;br&gt;"
              Response.Write(loggingstring)
          End Try
          conn.Close()
          Response.Write("Closed connection" + "&lt;br&gt;")
      End Using
  
  End Sub
  </code></pre>