I'm getting this weird error part of the way through the execution of my page, I know that the connection string exists and that earlier in the execution the connection opened successfully.

The ConnectionString property has not been initialized

Log File -
Code:
At the top of my page (page load)
Connection String: server=localhost;uid=myuid;pwd=mypwd;database=mydb
Connection State: Closed
In using block: Connection State: Open
Out Using block Connection State: Closed
Submission page: 3
before GetLabelsAndDefaults
Successful DB access here
after GetLabelsAndDefaults
before LoadAuthors
In LoadAuthors
In Using block
Connection state: Closed
Connection String: server=localhost;uid=myUID;pwd=myPwd;database=mydb
Attempt to open connection Failed (The ConnectionString property has not been initialized)
Here is the offending subs -

vb Code:
  1. Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
  2.         sSubPage = clAct.Decrypt(clAct.DeNull(Request.QueryString("pg")))
  3.         sMS_No = clAct.Decrypt(clAct.DeNull(Request.QueryString("ms_no")))
  4.         sMtg_No = clAct.DeNull(Request.QueryString("Meeting_No"))
  5.         sDoc_Type = clAct.DeNull(Request.QueryString("dt"))
  6.  
  7.         Call clAct.WriteToFile("Connection String: " & ConfigurationManager.ConnectionStrings("Sirius").ConnectionString & vbNewLine)
  8.         Call clAct.WriteToFile("Connection State: " & myCon.State.ToString & vbNewLine)
  9.         Using myCon
  10.             If myCon.State = ConnectionState.Closed Then myCon.Open()
  11.             Call clAct.WriteToFile("In using block: Connection State: " & myCon.State.ToString & vbNewLine)
  12.         End Using
  13.         Call clAct.WriteToFile("Out Using block Connection State: " & myCon.State.ToString & vbNewLine)
  14.  
  15.         If Page.IsPostBack = False Then
  16.             clAct.LoginCheck() ' Ensure that the user is logged in.
  17.  
  18.             ' Get the menu
  19.             litMenu.Text = menu.GetMenu(sSubPage.ToString).ToString
  20.  
  21.         Call clAct.WriteToFile("before GetLabelsAndDefaults" & vbNewLine)
  22.         GetLabelsAndDefaults()
  23.         Call clAct.WriteToFile("after GetLabelsAndDefaults" & vbNewLine)
  24.         Call clAct.WriteToFile("before LoadAuthors" & vbNewLine)
  25.         LoadAuthors() ' binds and loads the authors Datagrid
  26.         Call clAct.WriteToFile("after LoadAuthors" & vbNewLine)
  27.         End If
  28.     End Sub
  29.  
  30.     Private Sub LoadAuthors()
  31.         Call clAct.WriteToFile("In LoadAuthors" & vbNewLine)
  32.         Try
  33.             Using myCon
  34.                 Call clAct.WriteToFile("In Using block" & vbNewLine)
  35.                 Call clAct.WriteToFile("Connection state: " & myCon.State.ToString & vbNewLine)
  36.                 If myCon.State = ConnectionState.Closed Then
  37.                     Call clAct.WriteToFile("Connection String: " & ConfigurationManager.ConnectionStrings("Sirius").ConnectionString & vbNewLine)
  38.                     myCon.InitializeLifetimeService()
  39.                     myCon.Open()
  40.                 End If
  41.                 Call clAct.WriteToFile("after connection state check" & vbNewLine)
  42.                 Call clAct.WriteToFile("before CreateDataTable" & vbNewLine)
  43.                 Dim dt As DataTable = CreateDataTable()
  44.                 Call clAct.WriteToFile("after CreateDataTable" & vbNewLine)
  45.                 Dim dr As DataRow
  46.                 Dim myReader As SqlDataReader
  47.                 Dim myCmd As New SqlCommand
  48.                 With myCmd
  49.                     .CommandType = CommandType.StoredProcedure
  50.                     .CommandText = "up_gGetMS_Authors"
  51.                     .Connection = myCon
  52.                     .Parameters.AddWithValue("@MS_No", sMS_No.ToString)
  53.                     .Parameters.AddWithValue("@Version_No", Convert.ToInt16(1))
  54.                     myReader = .ExecuteReader() ' Open the DataReader
  55.                 End With
  56.  
  57.                 If myReader.HasRows = True Then
  58.                     Do While myReader.Read()
  59.                         dr = dt.NewRow()
  60.                         dr(0) = Convert.ToString(clAct.DeNull(myReader("Author_ID")))
  61.                         dr(1) = Convert.ToString(clAct.DeNull(myReader("User_ID")))
  62.                         dr(2) = Convert.ToString(clAct.DeNull(myReader("First_Name")))
  63.                         dr(3) = Convert.ToString(clAct.DeNull(myReader("Middle_Name")))
  64.                         dr(4) = Convert.ToString(clAct.DeNull(myReader("Last_Name")))
  65.                         dr(5) = Convert.ToString(clAct.DeNull(myReader("Affiliation")))
  66.                         dr(6) = Convert.ToBoolean(clAct.DeNull(myReader("Presenting_Auth")))
  67.                         dt.Rows.Add(dr)
  68.                     Loop
  69.                     myReader.Close()
  70.                     myReader = Nothing
  71.                 Else
  72.                     ' This page has not been saved before; add the submitting authors details into the Author datagrid by default
  73.                     Dim bUCaseLName As Boolean = clAct.GetJnl_MS_Authors_UCase_Last_Name()
  74.  
  75.                     myReader = clAct.Find_Author(clAct.GetCookie("UserDetails", "Email").ToString)
  76.                     If myReader.Read() Then
  77.                         dr = dt.NewRow()
  78.                         dr(0) = ""
  79.                         dr(1) = Convert.ToString(clAct.DeNull(myReader("User_ID")))
  80.                         dr(2) = Convert.ToString(clAct.DeNull(myReader("First_Name")))
  81.                         dr(3) = Convert.ToString(clAct.DeNull(myReader("Middle_Name")))
  82.                         dr(4) = IIf(bUCaseLName = True, Convert.ToString(clAct.DeNull(myReader("Last_Name"))).ToUpper, Convert.ToString(clAct.DeNull(myReader("Last_Name"))).ToString)
  83.                         dr(5) = Convert.ToString(clAct.DeNull(myReader("Affiliation")))
  84.                         dr(6) = Convert.ToBoolean(True)
  85.                         dt.Rows.Add(dr)
  86.                     End If
  87.                     myReader.Close()
  88.                     myReader = Nothing
  89.                 End If
  90.                 dgAuthors.DataSource = dt
  91.                 dgAuthors.DataBind()
  92.             End Using
  93.         Catch ex As Exception
  94.             Throw ex
  95.         End Try
  96.     End Sub