Server Error in '/application' 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:

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() +11310376
   KrajinaZaSkolou.Web.Code.Utility.PathResolver..ctor(String styleSheetName) in D:\Programatori\jbb\Code\KrajinaZaSkolou.cz\application\KrajinaZaSkolou.Web\Code\Utility\PathResolver.cs:51
   KrajinaZaSkolou.Web.<>c__DisplayClass8.<InitContainer>b__1(IContext c) in D:\Programatori\jbb\Code\KrajinaZaSkolou.cz\application\KrajinaZaSkolou.Web\Global.asax.cs:49
   Autofac.Builder.<>c__DisplayClassb`1.<Register>b__a(IContext c, IEnumerable`1 p) in d:\Repository\_External_projects\autofac\src\Source\Autofac\Builder\ContainerBuilder.cs:265
   Autofac.Builder.<>c__DisplayClasse`1.<Register>b__d(IContext c, IEnumerable`1 p) in d:\Repository\_External_projects\autofac\src\Source\Autofac\Builder\ContainerBuilder.cs:280
   Autofac.Component.Activation.DelegateActivator.ActivateInstance(IContext context, IEnumerable`1 parameters) in d:\Repository\_External_projects\autofac\src\Source\Autofac\Component\Activation\DelegateActivator.cs:69
   Autofac.Component.Registration.ResolveInstance(IContext context, IEnumerable`1 parameters, IDisposer disposer, Boolean& newInstance) in d:\Repository\_External_projects\autofac\src\Source\Autofac\Component\Registration.cs:119
   Autofac.Context.TryResolve(Service service, Object& instance, IEnumerable`1 parameters) in d:\Repository\_External_projects\autofac\src\Source\Autofac\Context.cs:526
   Autofac.Context.Resolve(Service service, IEnumerable`1 parameters) in d:\Repository\_External_projects\autofac\src\Source\Autofac\Context.cs:468
   Autofac.Context.Resolve(Type serviceType, IEnumerable`1 parameters) in d:\Repository\_External_projects\autofac\src\Source\Autofac\Context.cs:451
   Autofac.Context.Resolve(IEnumerable`1 parameters) in d:\Repository\_External_projects\autofac\src\Source\Autofac\Context.cs:437
   Autofac.Context.Resolve(Parameter[] parameters) in d:\Repository\_External_projects\autofac\src\Source\Autofac\Context.cs:120
   Autofac.Container.Resolve(Parameter[] parameters) in d:\Repository\_External_projects\autofac\src\Source\Autofac\Container.cs:507
   KrajinaZaSkolou.Web.Global.Application_OnStart(Object sender, EventArgs e) in D:\Programatori\jbb\Code\KrajinaZaSkolou.cz\application\KrajinaZaSkolou.Web\Global.asax.cs:37

[HttpException (0x80004005): Request is not available in this context]
   System.Web.HttpApplicationFactory.EnsureAppStartCalledForIntegratedMode(HttpContext context, HttpApplication app) +4242817
   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) +11439158
   System.Web.HttpRuntime.EnsureFirstRequestInit(HttpContext context) +88
   System.Web.HttpRuntime.ProcessRequestNotificationPrivate(IIS7WorkerRequest wr, HttpContext context) +4415988


Version Information: Microsoft .NET Framework Version:2.0.50727.8813; ASP.NET Version:2.0.50727.8951