-
Notifications
You must be signed in to change notification settings - Fork 7
Open
Description
When I first start debugging a project using IIS Express I get an ArgumentNullException in StructureMapDependencyScope.HttpContext, as System.Web.HttpContext.Current is null.
I'm not sure, but this might be because I'm trying to resolve dependencies in Application_Start for use in authorisation filters by calling DependencyResolver.Current.GetService<> - maybe this is too early for the HttpContext to exist?
In any case, it means that StructureMap is not created HTTP-scoped instances; I can end up with multiple instances of my DbContext, for example, despite the fact it should be HTTP-scoped.
Metadata
Metadata
Assignees
Labels
No labels