I have a web application which integrates with a remote sql server database.

In general the application works fine however at least once a day if someone is using the system they will receive the following error:

ExecuteReader requires an open and available Connection. The connection's current state is Closed.
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.InvalidOperationException: ExecuteReader requires an open and available Connection. The connection's current state is Closed.

Source Error:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

Stack Trace:


[InvalidOperationException: ExecuteReader requires an open and available Connection. The connection's current state is Closed.]
System.Data.SqlClient.SqlCommand.ValidateCommand(String method, Boolean executing) +279
System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream) +80
System.Data.SqlClient.SqlCommand.ExecuteReader() +42
Repairs.WebDBTools.LoadControl(ListBox& p_lstBox, String p_sqlstmt)
Repairs.ReceiveProduct.Page_Load(Object sender, EventArgs e)
System.Web.UI.Control.OnLoad(EventArgs e) +67
System.Web.UI.Control.LoadRecursive() +35
System.Web.UI.Page.ProcessRequestMain() +731
--------------------------------------------------------------------------------
Version Information: Microsoft .NET Framework Version:1.1.4322.573; ASP.NET Version:1.1.4322.573
i know above it shows the method that has the problem but this happens with any function i have that tries to access the database

the way in which my application works is that it creates an instance of the database connection for each session that accesses the site

i have no idea what is causing the error, at first i presumed it was some shared methods but after changed these to instance methods users still get the same error.

In order to fix the issue i've to restart IIS on our server so as to refresh everything.


Has anyone got any ideas to what could be the problem