我登录网站时经常报这种错。其中调用的Connection函数是这样的:
Public Shared ReadOnly Property Connection() As SqlConnection
Get
Dim connectionString As String = ConfigurationManager.ConnectionStrings("ConnectionString").ConnectionString
If m_connection Is Nothing Then
m_connection = New SqlConnection(connectionString)
m_connection.Open()
'ElseIf m_connection.State = System.Data.ConnectionState.Open Then
' m_connection.Close()
' m_connection.Open()
ElseIf m_connection.State = System.Data.ConnectionState.Closed Then
m_connection.Open()
ElseIf m_connection.State = System.Data.ConnectionState.Broken Then
m_connection.Close()
'm_connection.Dispose()
m_connection.Open()
End If
Return m_connection
End Get
End Property
这个错误虽然经常出现,但一刷新就好了。请问怎么解决??谁知道??分数不高,拜托了。
------解决方案--------------------------------------------------------
楼主怎么解决的