Server Error in '/' Application.

Runtime Error

Description: An application error occurred on the server. The service is unavailable at this moment. Please try again after one hour.

Exception Details: System.Web.HttpException: The service is unavailable at this moment.

Source Error:

Line 41:     protected void Application_BeginRequest(object sender, EventArgs e)
Line 42:     {
Line 43:         if (!IsServiceWindowOpen())
Line 44:             throw new HttpException(503, "The service is unavailable at this moment.");
Line 45:     }

Source File:

c:\inetpub\wwwroot\App_Code\Global.asax.cs    Line: 44

Stack Trace:

[HttpException (0x80004005): The service is unavailable at this moment.]
   App_Code.Global.Application_BeginRequest(Object sender, EventArgs e) in c:\inetpub\wwwroot\App_Code\Global.asax.cs:44
   System.Web.HttpApplication.SyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +440
   System.Web.HttpApplication.ExecuteStepImpl(IExecutionStep step) +132
   System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +73
   System.Web.HttpApplication.PipelineStepManager.ResumeSteps(Exception error) +501
   System.Web.HttpApplication.BeginProcessRequestNotification(HttpContext context, AsyncCallback cb) +88
   System.Web.HttpRuntime.ProcessRequestNotificationPrivate(IIS7WorkerRequest wr, HttpContext context) +776
   System.Web.Hosting.PipelineRuntime.ProcessRequestNotificationHelper(IntPtr rootedObjectsPointer, IntPtr nativeRequestContext, IntPtr moduleData, Int32 flags) +434
   System.Web.Hosting.PipelineRuntime.ProcessRequestNotification(IntPtr rootedObjectsPointer, IntPtr nativeRequestContext, IntPtr moduleData, Int32 flags) +22
   System.Web.Hosting.PipelineRuntime.ProcessRequestNotificationHelper(IntPtr rootedObjectsPointer, IntPtr nativeRequestContext, IntPtr moduleData, Int32 flags) +628
   System.Web.Hosting.PipelineRuntime.ProcessRequestNotification(IntPtr rootedObjectsPointer, IntPtr nativeRequestContext, IntPtr moduleData, Int32 flags) +22

[HttpException (0x80004005): The service is unavailable at this moment. Please try again after one hour.]
   System.Web.HttpApplicationFactory.EnsureAppStartCalledForIntegratedMode(HttpContext context, HttpApplication app) +504
   System.Web.HttpApplication.RegisterEventSubscriptionsWithIIS(IntPtr appContext, HttpContext context, MethodInfo[] handlers) +118
   System.Web.HttpApplication.InitSpecial(HttpApplicationState state, MethodInfo[] handlers, IntPtr appContext, HttpContext context) +176
   System.Web.HttpApplicationFactory.GetSpecialApplicationInstance(IntPtr appContext, HttpContext context) +220
   System.Web.Hosting.PipelineRuntime.InitializeApplication(IntPtr appContext) +303
   System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() +32
   System.Web.HttpRuntime.FirstRequestInit(HttpContext context) +659
   System.Web.HttpRuntime.EnsureFirstRequestInit(HttpContext context) +96
   System.Web.HttpRuntime.ProcessRequestNotificationPrivate(IIS7WorkerRequest wr, HttpContext context) +189
   System.Web.Hosting.PipelineRuntime.ProcessRequestNotificationHelper(IntPtr rootedObjectsPointer, IntPtr nativeRequestContext, IntPtr moduleData, Int32 flags) +434
   System.Web.Hosting.PipelineRuntime.ProcessRequestNotification(IntPtr rootedObjectsPointer, IntPtr nativeRequestContext, IntPtr moduleData, Int32 flags) +22

[HttpException (0x80004005): Service Unavailable]
   System.Web.Compilation.BuildManager.GetPreStartInitMethodsFromReferencedAssemblies() +412
   System.Web.Compilation.BuildManager.CallPreStartInitMethods(String preStartInitListPath) +156
   System.Web.Compilation.BuildManager.ExecutePreAppStart() +92
   System.Web.Hosting.HostingEnvironment.Initialize(ApplicationManager appManager, IApplicationHost appHost, IConfigMapPathFactory configMapPathFactory, HostingEnvironmentParameters hostingParameters, PolicyLevel policyLevel, Exception appDomainCreationException) +331
   System.Web.Hosting.HostingEnvironment.Initialize(ApplicationManager appManager, IApplicationHost appHost, IConfigMapPathFactory configMapPathFactory, HostingEnvironmentParameters hostingParameters, PolicyLevel policyLevel) +25
   System.Web.HttpRuntime.HostingInit(HostingEnvironmentFlags hostingFlags, PolicyLevel policyLevel, Exception appDomainCreationException) +218
   System.Web.HttpRuntime.FirstRequestInit(HttpContext context) +511
   System.Web.HttpRuntime.EnsureFirstRequestInit(HttpContext context) +96
   System.Web.HttpRuntime.ProcessRequestNotificationPrivate(IIS7WorkerRequest wr, HttpContext context) +189

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

Details:

To enable the details of this specific error message to be viewable on remote machines, please create a <customErrors> tag within a "web.config" configuration file located in the root directory of the current web application. This <customErrors> tag should then have its "mode" attribute set to "Off".

<!-- Web.Config Configuration File -->

<configuration>
    <system.web>
        <customErrors mode="Off"/>
    </system.web>
</configuration>

Notes:

The current error page you are seeing can be replaced by a custom error page by modifying the "defaultRedirect" attribute of the application's <customErrors> configuration tag to point to a custom error page URL.

<!-- Web.Config Configuration File -->

<configuration>
    <system.web>
        <customErrors mode="RemoteOnly" defaultRedirect="GenericErrorPage.htm"/>
    </system.web>
</configuration>