-
Notifications
You must be signed in to change notification settings - Fork 4.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ASP.NET 5 -- Impersonation -- A call to WSALookupServiceEnd was made while this call was still processing #45165
Comments
I couldn't figure out the best area label to add to this issue. If you have write-permissions please help me learn by adding exactly one area label. |
Tagging subscribers to this area: @dotnet/ncl Issue DetailsDescriptionASP.NET 5 -- Impersonation -- A call to WSALookupServiceEnd was made while this call was still processing As a note, this does work locally with IIS Express. This is only happening when the code is deployed running on IIS Windows Server 2012. Configuration
Regression?Doesn't work in .NET Core 3.1 or in .NET 5 Code public async Task<Results<string>> SendRequest(HttpRequestMessage request)
{
try
{
WindowsIdentity identity = (WindowsIdentity)_httpContextAccessor.HttpContext.User.Identity;
return await WindowsIdentity.RunImpersonated(identity.AccessToken, async () =>
{
using (var httpResp = await _client.SendAsync(request))
{
if (httpResp.IsSuccessStatusCode)
{
return (await httpResp.Content.ReadAsStringAsync()).AsResultValue();
}
else
{
var content = await httpResp.Content.ReadAsStringAsync();
var result = Utilities.Deserialize<Error>(content.AsResultValue<string>());
if (result.IsValue && result.Value.Code != null)
{
return Results<string>.AsResultError(new ErrorValue((int)result.Value.Code, result.Value.Message));
}
var phrase = !string.IsNullOrEmpty(httpResp.ReasonPhrase) ? $"httpResp.ReasonPhrase {content}" : $"unable to complete request due to {content}";
return Results<string>.AsResultError(new ErrorValue((int)httpResp.StatusCode, phrase));
}
}
});
}
catch (Exception ex)
{
return ex.AsResultError<string>();
}
} Error
As an additional note, I did try setting DOTNET_SYSTEM_NET_HTTP_USESOCKETSHTTPHANDLER = 0 without any success.
|
I'm running into this on Windows 8 while working on new test for #29935. So it is probably same underlying issue (or related) but the manifestation is different. (so the fix will likely not work) |
Description
ASP.NET 5 -- Impersonation -- A call to WSALookupServiceEnd was made while this call was still processing
As a note, this does work locally with IIS Express. This is only happening when the code is deployed running on IIS Windows Server 2012.
Configuration
.NET 5
Windows Server 2012 -- IIS 11
x64
Regression?
Doesn't work in .NET Core 3.1 or in .NET 5
Code
Error
As an additional note, I did try setting DOTNET_SYSTEM_NET_HTTP_USESOCKETSHTTPHANDLER = 0 (.net core 3.1 and .net 5) without any success.
I have tried running as the system administrator as well and receiving the same error.
The text was updated successfully, but these errors were encountered: