Server Error in '/' Application.

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

Source Error:


Line 11:     {
Line 12:         // Code that runs on application startup
Line 13:         HttpContext.Current.Response.AddHeader("x-frame-options", "SAMEORIGIN");
Line 14:         if (Response.Cookies.Count > 0)
Line 15:             foreach (string s in Response.Cookies.AllKeys)

Source File: e:\Websites\rsct.rajasthan.gov.in\wwwroot\Global.asax    Line: 13

Stack Trace:


[HttpException (0x80004005): Response is not available in this context.]
   System.Web.HttpContext.get_Response() +11822135
   ASP.global_asax.Application_Start(Object sender, EventArgs e) in e:\Websites\rsct.rajasthan.gov.in\wwwroot\Global.asax:13

[HttpException (0x80004005): Response is not available in this context.]
   System.Web.HttpApplicationFactory.EnsureAppStartCalledForIntegratedMode(HttpContext context, HttpApplication app) +546
   System.Web.HttpApplication.RegisterEventSubscriptionsWithIIS(IntPtr appContext, HttpContext context, MethodInfo[] handlers) +171
   System.Web.HttpApplication.InitSpecial(HttpApplicationState state, MethodInfo[] handlers, IntPtr appContext, HttpContext context) +173
   System.Web.HttpApplicationFactory.GetSpecialApplicationInstance(IntPtr appContext, HttpContext context) +255
   System.Web.Hosting.PipelineRuntime.InitializeApplication(IntPtr appContext) +347

[HttpException (0x80004005): Response is not available in this context.]
   System.Web.HttpRuntime.FirstRequestInit(HttpContext context) +552
   System.Web.HttpRuntime.EnsureFirstRequestInit(HttpContext context) +122
   System.Web.HttpRuntime.ProcessRequestNotificationPrivate(IIS7WorkerRequest wr, HttpContext context) +737


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