Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Avoid exceptions disposing the dependency scope. #9

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

vgaltes
Copy link

@vgaltes vgaltes commented Feb 9, 2015

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.

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.
@eddiegroves
Copy link

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: txavier@036b66b#diff-c57e75de84d025d341013689b68aaccaL89

@khandokar
Copy link

But when i install from https://www.nuget.org/packages/StructureMap.MVC5/, ArgumentNullException: is not handled

@B3nCr
Copy link

B3nCr commented Apr 21, 2017

I'm still seeing this exception.

@vgaltes vgaltes closed this Aug 18, 2020
@vgaltes vgaltes reopened this Aug 18, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants