Created
July 1, 2016 18:37
-
-
Save iamandycohen/b4b503ab5be63bb46cc1fda2a4e143ca to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
container.Register(Component.For<HttpContextBase>() | |
.UsingFactoryMethod(k => | |
{ | |
HttpContextBase httpContextBase = null; | |
HttpContext httpContext = HttpContext.Current; | |
if (httpContext != null) | |
{ | |
httpContextBase = new HttpContextWrapper(HttpContext.Current); | |
} | |
return httpContextBase; | |
}) | |
.LifeStyle.HybridPerWebRequestTransient()); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment