General Network Error, so now what can i do now ?

OK I worked a lot on this stupid General Network Error. I follow the advices given by a lot of people.

I closed my connections all the time, I dispose them, I added a connection.timeout, well everything humanly possible.

And guess what, still the same issue. I'm really fed up of this. If only I could have a better message.
The only way I can stop this is to add a pooling=false in my connection string.

So now is there anybody from Microsoft or a the guru of the gurus who can explain me what should I do ?

I use a tracking error code which sent me an email everytime something goes wrong in my projects.

This is an example of something I would like to kill for good.

[When]
Wednesday, March 31, 2004 3:35 PM

[Page]
/article.aspx?id_art=32

[Exception]
Exception of type System.Web.HttpUnhandledException was thrown.

System.Web.HttpUnhandledException: Exception of type System.Web.HttpUnhandledException was thrown. ---> System.Data.SqlClient.SqlException: General network error. Check your network documentation.

at System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream)

at System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior behavior)

at Scoilnet.Article.change_cols(Int32 nbcols)

at Scoilnet.Article.Page_PreRender(Object sender, EventArgs e)

at System.Web.UI.Control.OnPreRender(EventArgs e)

at System.Web.UI.Control.PreRenderRecursiveInternal()

at System.Web.UI.Page.ProcessRequestMain()

--- End of inner exception stack trace ---

at System.Web.UI.Page.HandleError(Exception e)

at System.Web.UI.Page.ProcessRequestMain()

at System.Web.UI.Page.ProcessRequest()

at System.Web.UI.Page.ProcessRequest(HttpContext context)

at System.Web.CallHandlerExecutionStep.System.Web.HttpApplication+IExecutionStep.Execute()

at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)

[Client]

xxx.xxx.xxx.xx

[Server]
www.scoilnet.ie

F:\Web projects\Scoilnet\article.aspx

[Request]

IE

http://www.scoilnet.ie/article.aspx?id_art=38

http://www.scoilnet.ie/article.aspx?id_art=32

 

5 Comments

  • I occasionally get this if the application isn't restarted every so often. I too made very sure all my connections were closing properly.



    To no avail, I was unable to find the actual cause of this problem.



    However, I did hack up a solution to it. Usually these calls are from what I view as "network glitches". Since out network is far less than reliable.



    So, I just wrote a nice little routine that opens a connection for me. I pass it the connection string, the number of retry attempts, and the retry interval.



    Usually, if this problem occurs, I can wait a fraction of a second and try again successfully.



    This so far has reduced the number of these errors I am seeing to zero. Been running solid for months now.

  • Adam Interesting idea. Can you send me the source of your routine, so that I can give a try ?



    I wonder also if the issue is not coming from Windows 2003 server where IIS runs under Network Service by default ?



    Maybe this can create some troubles with the SQL server impersonation ?

  • Do you have some recursion or looped connections going on? I've gotten to the point now that I'm militant about not opening a connection inside a loop for another DataReader, even to the point of using DataSets and ArrayLists to close the parent connection.

  • Protected Function OpenConnection(ByVal connectionString As String, ByVal retryLimit As Integer, ByVal retryInterval As TimeSpan) As SqlConnection

    Dim connection As SqlConnection, retryCount As Integer



    If connectionString Is Nothing Then

    Throw New ArgumentNullException("connectionString")

    End If



    connection = New SqlConnection(connectionString)

    retryCount = 0



    Do While True

    Try

    connection.Open()

    Exit Do

    Catch ex As SqlException

    retryCount += 1



    If retryCount >= retryLimit Then

    Throw

    End If



    Thread.CurrentThread.Sleep(retryInterval)

    End Try

    Loop



    Return connection

    End Function

  • hi guyes,



    everyone here gave the fix applied in their app. when this error occured.



    but no one has given the actual cause of this error

    e.g. bad network configuration, change in connection pooling setting of sql server etc.



    So can one give the exact reason why this error occures?

Comments have been disabled for this content.