Request is not available in this context

Server Error in '/' Application.

Request is not available in this context

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.Web.HttpException: Request is not available in this context

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:


[HttpException (0x80004005): Request is not available in this context]
   System.Web.UI.Page.get_Request() +10001655
   Com.TraceParts.TracePartsOnline.Web.UI.Base.GetCacheKey_Settings() in E:\Dev\TPO\TPO-2017-SP3-HF1\TpoWebSite\code\UI\Base.cs:7754
   Com.TraceParts.TracePartsOnline.Web.UI.Base.SettingsGet() in E:\Dev\TPO\TPO-2017-SP3-HF1\TpoWebSite\code\UI\Base.cs:7764
   Com.TraceParts.TracePartsOnline.Web.UI.Base.get_Settings() in E:\Dev\TPO\TPO-2017-SP3-HF1\TpoWebSite\code\UI\Base.cs:7738
   TraceParts.Online.Application.ApplicationContext_From_Web_UI_Base..ctor(Base _base, Boolean createAutomaticallyNewSelectionContextIfNoneIsExisting) in E:\Dev\TPO\TPO-2017-SP3-HF1\TpoWebSite\code\Application\Application.cs:671
   Com.TraceParts.TracePartsOnline.Web.UI.Base.get_ApplicationContext() in E:\Dev\TPO\TPO-2017-SP3-HF1\TpoWebSite\code\UI\Base.cs:870
   Com.TraceParts.TracePartsOnline.Web.pages.PartDetails.get_ProductConfiguratorModel() in E:\Dev\TPO\TPO-2017-SP3-HF1\TpoWebSite\PartDetails.aspx.cs:213
   Com.TraceParts.TracePartsOnline.Web.pages.PartDetails.CleanUp() in E:\Dev\TPO\TPO-2017-SP3-HF1\TpoWebSite\PartDetails.aspx.cs:293
   Com.TraceParts.TracePartsOnline.Web.pages.PartDetails.OnUnload(EventArgs e) in E:\Dev\TPO\TPO-2017-SP3-HF1\TpoWebSite\PartDetails.aspx.cs:1814
   System.Web.UI.Control.UnloadRecursive(Boolean dispose) +247
   System.Web.UI.Page.UnloadRecursive(Boolean dispose) +23
   System.Web.UI.Page.ProcessRequestCleanup() +57
   System.Web.UI.Page.ProcessRequest(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +245
   System.Web.UI.Page.ProcessRequest() +72
   System.Web.Util.AspCompatApplicationStep.System.Web.HttpApplication.IExecutionStep.Execute() +28
   System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +69

[HttpException (0x80004005): Exception of type 'System.Web.HttpException' was thrown.]
   System.Web.HttpAsyncResult.End() +9987139
   ASP.partdetails_aspx.EndProcessRequest(IAsyncResult ar) +15
   System.Web.CallHandlerExecutionStep.OnAsyncHandlerCompletion(IAsyncResult ar) +129


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