Run http request on separate thread. (#545)

This commit is contained in:
Justin Kotalik 2018-01-23 14:56:47 -08:00 committed by GitHub
parent 10f0f7b2ee
commit 3d167c1e6c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 10 deletions

View File

@ -299,12 +299,12 @@
<application name="Active Server Pages" groupId="ASP" />
</applicationDependencies>
<authentication>
<anonymousAuthentication enabled="false" userName="" />
<anonymousAuthentication enabled="true" userName="" />
<basicAuthentication enabled="false" />
<clientCertificateMappingAuthentication enabled="false" />
<digestAuthentication enabled="false" />
<iisClientCertificateMappingAuthentication enabled="false"></iisClientCertificateMappingAuthentication>
<windowsAuthentication enabled="true">
<windowsAuthentication enabled="false">
<providers>
<add value="Negotiate" />
<add value="NTLM" />

View File

@ -80,14 +80,7 @@ namespace Microsoft.AspNetCore.Server.IISIntegration
var context = server._iisContextFactory.CreateHttpContext(pInProcessHandler);
var task = context.ProcessRequestAsync();
// This should never fail
if (task.IsCompleted)
{
context.Dispose();
return ConvertRequestCompletionResults(task.Result);
}
var task = Task.Run(() => context.ProcessRequestAsync());
task.ContinueWith((t, state) => CompleteRequest((IISHttpContext)state, t), context);