Server Error in '/' Application.

Invalid attempt to call CheckDataIsReady when reader 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: Invalid attempt to call CheckDataIsReady when reader is closed.

Source Error:


Line 372:                                            System.Data.SqlClient.SqlDataReader products = Connection.GetTable("*", "products p WITH(NOLOCK) OUTER APPLY dbo.GetProductPropertyByWEF(p.pid, 33, NULL) PP", "p.sid IN (1,2) AND p.iswebsite = 1 AND p.pcid = " + sdr["pcid"], "p.ordercol ASC");
Line 373:
Line 374:                                            int total = int.Parse("" + sdr["total"]);
Line 375:                                            int ul_width = 255 * (total % 9 == 0 ? total / 9 : (total / 9) + 1);
Line 376:

Source File: c:\SITEDATA\AplombSite\Default.aspx    Line: 374

Stack Trace:


[InvalidOperationException: Invalid attempt to call CheckDataIsReady when reader is closed.]
   System.Data.SqlClient.SqlDataReader.CheckDataIsReady(Int32 columnIndex, Boolean allowPartiallyReadColumn, Boolean permitAsync, String methodName) +2744737
   System.Data.SqlClient.SqlDataReader.TryReadColumn(Int32 i, Boolean setTimeout, Boolean allowPartiallyReadColumn) +54
   System.Data.SqlClient.SqlDataReader.GetValueInternal(Int32 i) +41
   System.Data.SqlClient.SqlDataReader.GetValue(Int32 i) +92
   ASP.default_aspx.__Render__control1(HtmlTextWriter __w, Control parameterContainer) in c:\SITEDATA\AplombSite\Default.aspx:374
   System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +117
   System.Web.UI.Page.Render(HtmlTextWriter writer) +39
   System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) +79
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +8753


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