Server Error in '/' Application.

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:

The source code that generated this unhandled exception can only be shown when compiled in debug mode. To enable this, please follow one of the below steps, then request the URL:

1. Add a "Debug=true" directive at the top of the file that generated the error. Example:

  <%@ Page Language="C#" Debug="true" %>

or:

2) Add the following section to the configuration file of your application:

<configuration>
   <system.web>
       <compilation debug="true"/>
   </system.web>
</configuration>

Note that this second technique will cause all files within a given application to be compiled in debug mode. The first technique will cause only that particular file to be compiled in debug mode.

Important: Running applications in debug mode does incur a memory/performance overhead. You should make sure that an application has debugging disabled before deploying into production scenario.

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 async) +676
   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) +155
   System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method) +83
   System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior behavior, String method) +198
   System.Data.Entity.Infrastructure.Interception.InternalDispatcher`1.Dispatch(TTarget target, Func`3 operation, TInterceptionContext interceptionContext, Action`3 executing, Action`3 executed) +98
   System.Data.Entity.Infrastructure.Interception.DbCommandDispatcher.Reader(DbCommand command, DbCommandInterceptionContext interceptionContext) +510
   System.Data.Entity.Core.EntityClient.Internal.EntityCommandDefinition.ExecuteStoreCommands(EntityCommand entityCommand, CommandBehavior behavior) +36

[EntityCommandExecutionException: An error occurred while executing the command definition. See the inner exception for details.]
   System.Data.Entity.Core.EntityClient.Internal.EntityCommandDefinition.ExecuteStoreCommands(EntityCommand entityCommand, CommandBehavior behavior) +125
   System.Data.Entity.Core.Objects.ObjectContext.CreateFunctionObjectResult(EntityCommand entityCommand, ReadOnlyCollection`1 entitySets, EdmType[] edmTypes, ExecutionOptions executionOptions) +817
   System.Data.Entity.Core.Objects.<>c__DisplayClass161_0`1.<ExecuteFunction>b__1() +105
   System.Data.Entity.Core.Objects.ObjectContext.ExecuteInTransaction(Func`1 func, IDbExecutionStrategy executionStrategy, Boolean startLocalTransaction, Boolean releaseConnectionOnSuccess) +459
   System.Data.Entity.Core.Objects.<>c__DisplayClass161_0`1.<ExecuteFunction>b__0() +229
   System.Data.Entity.SqlServer.DefaultSqlExecutionStrategy.Execute(Func`1 operation) +234
   System.Data.Entity.Core.Objects.ObjectContext.ExecuteFunction(String functionName, ExecutionOptions executionOptions, ObjectParameter[] parameters) +855
   OurGovt.ResourceAPI.ContentResource.Get(OurGovernmentEntities dc, String key) in C:\Users\Ken\source\repos\GOSL\ResourceAPI\Resources\ContentResource.vb:34
   OurGovt.ResourceAPI.ResourceService`1.Get(String key) in C:\Users\Ken\source\repos\GOSL\ResourceAPI\Services\ResourceService.vb:218

[Exception: 'Get' method missing or incorrect signature in class ContentResource - message: ExecuteReader requires an open and available Connection. The connection's current state is closed.]
   OurGovt.ResourceAPI.ResourceService`1.Get(String key) in C:\Users\Ken\source\repos\GOSL\ResourceAPI\Services\ResourceService.vb:226
   OurGovt.ResourceAPI.ResourceRepository`1.Reload(String key) in C:\Users\Ken\source\repos\GOSL\ResourceAPI\ResourceRepository.vb:82
   OurGovt.ResourceAPI.ResourceRepository`1.get_Item(String key) in C:\Users\Ken\source\repos\GOSL\ResourceAPI\ResourceRepository.vb:48
   OurGovt.Web.UI.WebControls.ContentRepositoryControl.Render(HtmlTextWriter writer) in C:\Users\Ken\source\repos\GOSL\OurGovt.Web\UI\WebControls\ContentRepositoryControl.vb:18
   System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) +79
   ASP.about_aspx.__Renderm(HtmlTextWriter __w, Control parameterContainer) +446
   System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +117
   System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) +79
   ASP.primeminister_master.__Renderwrap(HtmlTextWriter __w, Control parameterContainer) +713
   System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +117
   System.Web.UI.HtmlControls.HtmlForm.RenderChildren(HtmlTextWriter writer) +11836097
   System.Web.UI.HtmlControls.HtmlContainerControl.Render(HtmlTextWriter writer) +47
   System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) +79
   System.Web.UI.HtmlControls.HtmlForm.RenderControl(HtmlTextWriter writer) +50
   System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +250
   System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) +79
   System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +250
   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.4087.0