Server Error in '/' Application.

There is already an open DataReader associated with this Command which must be closed first.

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: There is already an open DataReader associated with this Command which must be closed first.

Source Error:


Line 83:         cmd.Connection = conection;
Line 84:         open_connection();
Line 85:         int chk = cmd.ExecuteNonQuery();
Line 86:         close_connection();
Line 87:         bool result = false;

Source File: d:\Inetpub\vhosts\rslantext.com\drostext.com\App_Code\DBHelper.cs    Line: 85

Stack Trace:


[InvalidOperationException: There is already an open DataReader associated with this Command which must be closed first.]
   System.Data.SqlClient.SqlInternalConnectionTds.ValidateConnectionForExecute(SqlCommand command) +1733354
   System.Data.SqlClient.SqlCommand.ValidateCommand(String method, Boolean async) +314
   System.Data.SqlClient.SqlCommand.InternalExecuteNonQuery(TaskCompletionSource`1 completion, String methodName, Boolean sendToPipe, Int32 timeout, Boolean& usedCache, Boolean asyncWrite, Boolean inRetry) +163
   System.Data.SqlClient.SqlCommand.ExecuteNonQuery() +278
   DBHelper.Execute_command_non(SqlCommand cmd) in d:\Inetpub\vhosts\rslantext.com\drostext.com\App_Code\DBHelper.cs:85
   ArticlesProvider.UpdateVisits(Int32 ArticleD) in d:\Inetpub\vhosts\rslantext.com\drostext.com\App_Code\ArticlesProvider.cs:120
   Article.UpdateVisits() in d:\Inetpub\vhosts\rslantext.com\drostext.com\Article.aspx.cs:87
   Article.Page_Load(Object sender, EventArgs e) in d:\Inetpub\vhosts\rslantext.com\drostext.com\Article.aspx.cs:41
   System.Web.UI.Control.OnLoad(EventArgs e) +108
   System.Web.UI.Control.LoadRecursive() +90
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1533


Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.8.4700.0