Windows XP, IIS 6, VS 2005 , Framework 2.0 ASP.NET 2.0
Deployment Environment :
Windows Server 2008, IIS 7 , ASP.NET 2.0 and Framework 2.0
Error Message :
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 contextSource 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() +3465893
IIMSMain.Global.Application_Start(Object sender, EventArgs e) in C:\Prabakar\IIMS\Global.asax.cs:27
[HttpException (0x80004005): Request is not available in this context]
System.Web.HttpApplicationFactory.EnsureAppStartCalledForIntegratedMode(HttpContext context, HttpApplication app) +3385130
System.Web.HttpApplication.RegisterEventSubscriptionsWithIIS(IntPtr appContext, HttpContext context, MethodInfo[] handlers) +125
System.Web.HttpApplication.InitSpecial(HttpApplicationState state, MethodInfo[] handlers, IntPtr appContext, HttpContext context) +182
System.Web.HttpApplicationFactory.GetSpecialApplicationInstance(IntPtr appContext, HttpContext context) +259
System.Web.Hosting.PipelineRuntime.InitializeApplication(IntPtr appContext) +245
[HttpException (0x80004005): Request is not available in this context]
System.Web.HttpRuntime.FirstRequestInit(HttpContext context) +3465475
System.Web.HttpRuntime.EnsureFirstRequestInit(HttpContext context) +69
System.Web.HttpRuntime.ProcessRequestNotificationPrivate(IIS7WorkerRequest wr, HttpContext context) +675
Version Information: Microsoft .NET Framework Version:2.0.50727.1434; ASP.NET Version:2.0.50727.1434
Solution

Change in Global.asax file in the
protected void Application_Start(Object sender, EventArgs e)
{
ApplicationConfiguration.OnApplicationStart(HttpContext.Current.Server.MapPath(HttpContext.Current.Request.ApplicationPath));
Masters.SystemFramework.ApplicationConfiguration.OnApplicationStart(HttpContext.Current.Server.MapPath(HttpContext.Current.Request.ApplicationPath));
}
Then change the application pool to classic .net , this is how i solved my problem




