• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1955
  • Last Modified:

Inconsistent Error: General Network Error. Check your network documentation

I am using the Microsoft Development Environment to work on some ASP.net pages for a website.  I can encountering an error at random times and cannot determine why I am getting it.   The error says

'General network error.  Check your network documentation.

Description: An unhandled exception occurred during the execution of the current web request.  Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.data.SqlClient.SqlException: General network error. Check your network documentation.

Soure Error:.....'

The error is always in a query but the query has not been changed and works at other times without changing any variables.  I contacted my web hosting service and they said there are no known server issues which would cause something like that.  It only seem to get this in development.  I don't seem to get this when the pages are live.  Any suggestions on how to fix this annoyance??
0
vb9666
Asked:
vb9666
1 Solution
 
Éric MoreauSenior .Net ConsultantCommented:
Hi vb9666,

I had that intermittent problem last year.

Add these 3 attributes to your connection string:
Connect Timeout=60
Pooling=False
Max Pool Size=5

Also set the CommandTimeout to a big value like 600000 on each command.

Cheers!
0
 
vb9666Author Commented:
emoreau,

Thanks for the help.  I added the attributes to the connection string and that seemed to fix the problem.  I haven't updated in the timeout in each command yet (which there are many) but will if I notice any future problems.  

vb9666
0

Featured Post

Get your Disaster Recovery as a Service basics

Disaster Recovery as a Service is one go-to solution that revolutionizes DR planning. Implementing DRaaS could be an efficient process, easily accessible to non-DR experts. Learn about monitoring, testing, executing failovers and failbacks to ensure a "healthy" DR environment.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now