I making changes to the old ASP.NET app created with Framework 2.0. Global.asax don't have Application_Start but when I'm debugging on IIS7 I'm getting error
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:
An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.
Stack Trace:
[HttpException (0x80004005): Request is not available in this context]
System.Web.HttpContext.get_Request() +11207688
Microsoft.Practices.CompositeWeb.Services.WebConfigModuleInfoStore.GetConfiguration(String
configFilePath) +130
Microsoft.Practices.CompositeWeb.Services.WebConfigModuleInfoStore.PopulateSection
(ModulesConfigurationSection section, String rootDirectory) +274
Microsoft.Practices.CompositeWeb.Services.WebConfigModuleInfoStore.GetModuleConfigurationSection
() +103
Microsoft.Practices.CompositeWeb.Services.WebModuleEnumerator.EnumerateModules() +216
Microsoft.Practices.CompositeWeb.WebClientApplication.LoadModules() +443
Microsoft.Practices.CompositeWeb.WebClientApplication.Application_Start(Object sender,
EventArgs e) +262
[HttpException (0x80004005): Request is not available in this context]
System.Web.HttpApplicationFactory.EnsureAppStartCalledForIntegratedMode(HttpContext
context, HttpApplication app) +4185553
System.Web.HttpApplication.RegisterEventSubscriptionsWithIIS(IntPtr appContext,
HttpContext context, MethodInfo[] handlers) +205
System.Web.HttpApplication.InitSpecial(HttpApplicationState state, MethodInfo[] handlers, IntPtr
appContext, HttpContext context) +336
System.Web.HttpApplicationFactory.GetSpecialApplicationInstance(IntPtr appContext,
HttpContext context) +350
System.Web.Hosting.PipelineRuntime.InitializeApplication(IntPtr appContext) +382
[HttpException (0x80004005): Request is not available in this context]
System.Web.HttpRuntime.FirstRequestInit(HttpContext context) +11335894
System.Web.HttpRuntime.EnsureFirstRequestInit(HttpContext context) +88
System.Web.HttpRuntime.ProcessRequestNotificationPrivate(IIS7WorkerRequest wr,
HttpContext context) +4355316
When I'm switching for development to the webserver part of VS I'm not getting any kind of error and everything working fine. Any ideas?