webadvanced / Structuremap.MVC5

Apache License 2.0
21 stars 9 forks source link

Value cannot be null. Parameter name: httpContext #19

Open ahbagheri opened 4 years ago

ahbagheri commented 4 years ago

I am getting this error once in a while and it is automatically fixed by itself. Any ideas?


Value cannot be null. Parameter name: httpContext

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.ArgumentNullException: Value cannot be null. Parameter name: httpContext

[ArgumentNullException: Value cannot be null.

Parameter name: httpContext]

System.Web.HttpContextWrapper..ctor(HttpContext httpContext) +11702970

StrategicUnderwriterAig.DependencyResolution.StructureMapDependencyScope.get_HttpContext() in C:\myproject\DependencyResolution\StructureMapDependencyScope.cs:69

StrategicUnderwriterAig.DependencyResolution.StructureMapDependencyScope.get_CurrentNestedContainer() in C:\myproject\DependencyResolution\StructureMapDependencyScope.cs:55

StrategicUnderwriterAig.DependencyResolution.StructureMapDependencyScope.DoGetAllInstances(Type serviceType) in C:\myproject\DependencyResolution\StructureMapDependencyScope.cs:105

System.Web.Http.Services.DefaultServices.GetServices(Type serviceType) +136

Full error detail: https://jsfiddle.net/L9poaesu/