public void ProcessRequest() { HttpListenerContext ctx = _listener.GetContext(); HttpListenerWorkerRequest workerRequest = new HttpListenerWorkerRequest(ctx, _virtualDir, _physicalDir); HttpRuntime.ProcessRequest(workerRequest); }
internal override void RejectRequestNow(HttpListenerWorkerRequest wr, bool silent) { NetHttpRuntime.RejectRequestNow(this, (WebHostWorkerRequest)wr, silent); }
internal override void ProcessRequestNow(HttpListenerWorkerRequest wr) { _runtime.ProcessRequestNow((WebHostWorkerRequest)wr, _applicationFactory); }
public void AsActiveHttpContext(Action<HttpContext> action) { var worker = new HttpListenerWorkerRequest(this); try { response.Context = new HttpContext(worker); HttpContext.Current = response.Context; action(HttpContext.Current); } finally { HttpContext.Current.Response.Flush(); HttpContext.Current = null; response.Context = null; } }