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.SqlClient.SqlConnection.GetOpenConnection() +3334381
   System.Data.SqlClient.SqlConnection.get_Parser() +12
   System.Data.SqlClient.SqlCommand.SetUpRPCParameters(_SqlRPC rpc, Int32 startCount, Boolean inSchema, SqlParameterCollection parameters) +70
   System.Data.SqlClient.SqlCommand.BuildExecuteSql(CommandBehavior behavior, String commandText, SqlParameterCollection parameters, _SqlRPC& rpc) +462
   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.Common.DbDataAdapter.FillInternal(DataSet dataset, DataTable[] datatables, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior) +214
   System.Data.Common.DbDataAdapter.Fill(DataTable[] dataTables, Int32 startRecord, Int32 maxRecords, IDbCommand command, CommandBehavior behavior) +465
   System.Data.Common.DbDataAdapter.Fill(DataTable dataTable) +147
   MHB.DBHandler.getProductByBrand(String brand_name, String style) in D:\LocalSites\goodwin-ecommerce-html-template\PaksGoodwin_202307\PaksNewSite-Net-40_CustomerHandler\DBHandler.cs:644
   Logistics.StructureData.getProduct(String brand_name, String style, Int32 pscid) +73
   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