Open vgaltes opened 9 years ago
Would be great to see the merged as I've also encountered this issue and have manually patched for now...
Edit: DisposeNestedContainer also needs a HttpContext null check, example: https://github.com/txavier/Structuremap.MVC5/commit/036b66bdf2b9026b931e8b50eebbd6dee9183b99#diff-c57e75de84d025d341013689b68aaccaL89
But when i install from https://www.nuget.org/packages/StructureMap.MVC5/, ArgumentNullException: is not handled
I'm still seeing this exception.
When the Dispose method of the StructureMapDependencyScope is called, an exception is thrown trying to access to System.Web.HttpContext.Current. Checking the value before using it will avoid this exception.