// Setup the asynchronous stuff and application variables // context for the entire deal is already rooted for native handler internal void AssignContext(HttpContext context) { Debug.Assert(HttpRuntime.UseIntegratedPipeline, "HttpRuntime.UseIntegratedPipeline"); if (null == _context) { _stepManager.InitRequest(); _context = context; _context.ApplicationInstance = this; if (_context.TraceIsEnabled) HttpRuntime.Profile.StartRequest(_context); // this will throw if config is invalid, so we do it after HttpContext.ApplicationInstance is set _context.SetImpersonationEnabled(); } }