Server Error in '/' Application.

Invalid operation. The connection 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 operation. The connection is closed.

Source Error:


Line 156:            head.Controls.Add(llc);
Line 157:
Line 158:            LiteralControl lc = new LiteralControl(StructureData.getProduct(dt.Rows[0]["brand_name"].ToString(), product_name, psc_id));
Line 159:
Line 160:            head.Controls.Add(lc);

Source File: d:\Plesk\Vhosts\pakcosmetics.com\httpdocs\product.aspx.cs    Line: 158

Stack Trace:


[InvalidOperationException: Invalid operation. The connection is closed.]
   System.Data.ProviderBase.DbConnectionClosed.CreateReferenceCollection() +95
   System.Data.ProviderBase.DbConnectionInternal.AddWeakReference(Object value, Int32 tag) +36
   System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString, Boolean isInternal, Boolean forDescribeParameterEncryption, Boolean shouldCacheForAlwaysEncrypted) +328
   System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async, Int32 timeout, Task& task, Boolean asyncWrite, Boolean inRetry, SqlDataReader ds, Boolean describeParameterEncryptionRequest) +3392
   System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, TaskCompletionSource`1 completion, Int32 timeout, Task& task, Boolean& usedCache, Boolean asyncWrite, Boolean inRetry) +725
   System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method) +84
   System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior behavior, String method) +207
   System.Data.SqlClient.SqlCommand.ExecuteReader() +142
   MHB.DBHandler.getVariationsData(String productid) in D:\LocalSites\goodwin-ecommerce-html-template\PaksGoodwin_202307\PaksNewSite-Net-40_CustomerHandler\DBHandler.cs:121
   Logistics.StructureData.GetVariationData(String productid) +52
   Logistics.StructureData.getProduct(String brand_name, String style, Int32 pscid) +242
   product.setProductListing() in d:\Plesk\Vhosts\pakcosmetics.com\httpdocs\product.aspx.cs:158
   product.Page_Load(Object sender, EventArgs e) in d:\Plesk\Vhosts\pakcosmetics.com\httpdocs\product.aspx.cs:101
   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.4494.0