diff --git a/src/Microsoft.AspNet.RequestContainer/ContainerMiddleware.cs b/src/Microsoft.AspNet.RequestContainer/ContainerMiddleware.cs index a33a6ac7db..61d985fc3d 100644 --- a/src/Microsoft.AspNet.RequestContainer/ContainerMiddleware.cs +++ b/src/Microsoft.AspNet.RequestContainer/ContainerMiddleware.cs @@ -43,20 +43,13 @@ namespace Microsoft.AspNet.RequestContainer _rootHttpContextAccessor.SetContextSource(AccessRootHttpContext, ExchangeRootHttpContext); } -#if NET45 -#else -#warning This MUST NOT be ThreadStatic in reality - [ThreadStatic] - HttpContext THIS_IS_BROKEN_AND_MUST_BE_CHANGED; -#endif - private HttpContext AccessRootHttpContext() { #if NET45 return CallContext.LogicalGetData(LogicalDataKey) as HttpContext; #else - return THIS_IS_BROKEN_AND_MUST_BE_CHANGED; -#endif + throw new Exception("TODO: CallContext not available"); +#endif } private HttpContext ExchangeRootHttpContext(HttpContext httpContext) @@ -66,9 +59,7 @@ namespace Microsoft.AspNet.RequestContainer CallContext.LogicalSetData(LogicalDataKey, httpContext); return prior; #else - var prior = THIS_IS_BROKEN_AND_MUST_BE_CHANGED; - THIS_IS_BROKEN_AND_MUST_BE_CHANGED = httpContext; - return prior; + return null; #endif }