Fixed the immediate issue where setup fails.

This is a temporary fix falling back to original behavior of the HttpContextAccessor.
This commit is contained in:
Sipke Schoorstra
2015-05-28 00:59:48 +02:00
parent 34008c469e
commit 1e83068b8c

View File

@@ -10,9 +10,9 @@ namespace Orchard.Mvc {
}
public HttpContextBase Current() {
HttpContextBase httpContextBase;
_context.TryResolve(out httpContextBase);
return httpContextBase;
// TODO: HttpContextBase is not registred in the "shell" lifetime scope, so resolving it will cause an exception.
return HttpContext.Current != null ? new HttpContextWrapper(HttpContext.Current) : null;
}
}
}