Skip to content
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

Error 12175 calling WINHTTP_CALLBACK_STATUS_REQUEST_ERROR, 'A security error occurred #33509

Closed
akashlimbani opened this issue Mar 12, 2020 · 7 comments
Labels
area-System.Net.Http test-run-core Test failures in .NET Core test runs
Milestone

Comments

@akashlimbani
Copy link

In local working fine.

But on IIS server we got error :

"Error 12175 calling WINHTTP_CALLBACK_STATUS_REQUEST_ERROR, 'A security error occurred

image

@Dotnet-GitSync-Bot Dotnet-GitSync-Bot added area-System.Net.Http untriaged New issue has not been triaged by the area owner labels Mar 12, 2020
@scalablecory
Copy link
Contributor

What version of .NET Core are you running? Does the same thing happen when using HttpClientHandler or SocketHttpHandler, instead of WinHttpHandler?

And lastly, if it's repeatable and you can whittle it down to a small repro, that'd be awesome.

@akashlimbani
Copy link
Author

akashlimbani commented Mar 18, 2020

.NET Core 2.2 @scalablecory

@karelz
Copy link
Member

karelz commented Apr 16, 2020

Triage: This error usually means something is wrong with certificate, or TLS connection.
Right now it is not actionable -- we would need a repro - ideally console app against the URL in the picture above.
Also, please try to run the repro with SocketsHttpHandler as asked above.

Closing for now, feel free to reopen one it is actionable (aka repro is available). Thanks!

@karelz karelz closed this as completed Apr 16, 2020
@karelz karelz removed the untriaged New issue has not been triaged by the area owner label Apr 16, 2020
@karelz karelz added this to the 5.0 milestone Apr 16, 2020
@ghost ghost locked as resolved and limited conversation to collaborators Dec 10, 2020
@danmoseley danmoseley reopened this Jan 18, 2021
@danmoseley
Copy link
Member

This sometimes happens in our test runs eg
https://helixre8s23ayyeko0k025g8.blob.core.windows.net/dotnet-runtime-refs-heads-master-0f4db9e2139448f6a5/System.Net.Http.WinHttpHandler.Functional.Tests/console.32654000.log?sv=2019-07-07&se=2021-01-31T12%3A03%3A10Z&sr=c&sp=rl&sig=vdkLzE7tu6O1VzWsU%2BY9gjYi%2FuK3I1KUa8giFp3UUaA%3D

    System.Net.Http.Functional.Tests.PlatformHandlerTest_AutoRedirect_Http2.DefaultHeaders_SetCredentials_ClearedOnRedirect(remoteServer: (BaseUri: https://corefx-net-http2.azurewebsites.net/, HttpVersion: 2.0), statusCode: 302) [FAIL]
      System.Net.Http.HttpRequestException : An error occurred while sending the request.
      ---- System.Net.Http.WinHttpException : Error 12175 calling WINHTTP_CALLBACK_STATUS_REQUEST_ERROR, 'A security error occurred'.
      Stack Trace:
        /_/src/libraries/System.Net.Http/src/System/Net/Http/HttpClient.cs(550,0): at System.Net.Http.HttpClient.SendAsyncCore(HttpRequestMessage request, HttpCompletionOption completionOption, Boolean async, CancellationTokenSource cts, Boolean disposeCts, CancellationTokenSource pendingRequestsCts, CancellationToken originalCancellationToken)
        /_/src/libraries/Common/tests/System/Net/Http/HttpClientHandlerTest.AutoRedirect.cs(577,0): at System.Net.Http.Functional.Tests.HttpClientHandlerTest_AutoRedirect.DefaultHeaders_SetCredentials_ClearedOnRedirect(RemoteServer remoteServer, Int32 statusCode)
        --- End of stack trace from previous location ---
        ----- Inner Stack Trace -----
        /_/src/libraries/Common/src/System/Threading/Tasks/RendezvousAwaitable.cs(63,0): at System.Threading.Tasks.RendezvousAwaitable`1.GetResult()
        /_/src/libraries/System.Net.Http.WinHttpHandler/src/System/Net/Http/WinHttpHandler.cs(942,0): at System.Net.Http.WinHttpHandler.StartRequestAsync(WinHttpRequestState state)
      Output:
        Uri: https://corefx-net-http2.azurewebsites.net/Redirect.ashx?statuscode=302&uri=https%3A%2F%2Fcorefx-net-http2.azurewebsites.net%2FEcho.ashx

on windows.10.amd64.server20h1.open.rt.

This observation may not help, but I figured I'd reuse this bug for it.

@karelz karelz added the test-run-core Test failures in .NET Core test runs label Feb 4, 2021
@karelz karelz modified the milestones: 5.0.0, 6.0.0 Feb 4, 2021
@karelz
Copy link
Member

karelz commented May 10, 2021

No failure between 2/23-5/10 (incl. PRs). Closing.

@karelz karelz closed this as completed May 10, 2021
@maraf
Copy link
Member

maraf commented Jun 7, 2022

Failed on #20220606.61

System.Net.Http.Functional.Tests.PlatformHandler_HttpClientHandler_ClientCertificates_Test.Manual_CertificateOnlySentWhenValid_Success(certIndex: 1, serverExpectsClientCertificate: True) [FAIL]
      System.AggregateException : One or more errors occurred. (An error occurred while sending the request.) ( Received an unexpected EOF or 0 bytes from the transport stream.)
      ---- System.Net.Http.HttpRequestException : An error occurred while sending the request.
      -------- System.Net.Http.WinHttpException : Error 12175 calling WINHTTP_CALLBACK_STATUS_REQUEST_ERROR, 'Error de seguridad'.
      ---- System.IO.IOException :  Received an unexpected EOF or 0 bytes from the transport stream.
      Stack Trace:
        /_/src/libraries/Common/tests/System/Threading/Tasks/TaskTimeoutExtensions.cs(88,0): at System.Threading.Tasks.TaskTimeoutExtensions.WhenAllOrAnyFailed(Task[] tasks)
        /_/src/libraries/Common/tests/System/Threading/Tasks/TaskTimeoutExtensions.cs(55,0): at System.Threading.Tasks.TaskTimeoutExtensions.WhenAllOrAnyFailed(Task[] tasks, Int32 millisecondsTimeout)
        /_/src/libraries/Common/tests/System/Net/Http/HttpClientHandlerTest.ClientCertificates.cs(107,0): at System.Net.Http.Functional.Tests.HttpClientHandler_ClientCertificates_Test.<>c__DisplayClass6_0.<<Manual_CertificateOnlySentWhenValid_Success>b__1>d.MoveNext()
        --- End of stack trace from previous location ---
        /_/src/libraries/Common/tests/System/Net/Http/LoopbackServer.cs(101,0): at System.Net.Test.Common.LoopbackServer.CreateServerAsync(Func`2 funcAsync, Options options)
        /_/src/libraries/Common/tests/System/Net/Http/HttpClientHandlerTest.ClientCertificates.cs(102,0): at System.Net.Http.Functional.Tests.HttpClientHandler_ClientCertificates_Test.Manual_CertificateOnlySentWhenValid_Success(Int32 certIndex, Boolean serverExpectsClientCertificate)
        --- End of stack trace from previous location ---
        ----- Inner Stack Trace #1 (System.Net.Http.HttpRequestException) -----
        /_/src/libraries/System.Net.Http/src/System/Net/Http/HttpClient.cs(190,0): at System.Net.Http.HttpClient.GetStringAsyncCore(HttpRequestMessage request, CancellationToken cancellationToken)
        /_/src/libraries/Common/tests/System/Threading/Tasks/TaskTimeoutExtensions.cs(120,0): at System.Threading.Tasks.TaskTimeoutExtensions.GetRealException(Task task)
        ----- Inner Stack Trace -----
        /_/src/libraries/Common/src/System/Threading/Tasks/RendezvousAwaitable.cs(64,0): at System.Threading.Tasks.RendezvousAwaitable`1.GetResult()
        /_/src/libraries/System.Net.Http.WinHttpHandler/src/System/Net/Http/WinHttpHandler.cs(957,0): at System.Net.Http.WinHttpHandler.StartRequestAsync(WinHttpRequestState state)
        ----- Inner Stack Trace #2 (System.IO.IOException) -----
        /_/src/libraries/System.Net.Security/src/System/Net/Security/SslStream.IO.cs(366,0): at System.Net.Security.SslStream.ReceiveBlobAsync[TIOAdapter](CancellationToken cancellationToken)
        /_/src/libraries/System.Net.Security/src/System/Net/Security/SslStream.IO.cs(289,0): at System.Net.Security.SslStream.ForceAuthenticationAsync[TIOAdapter](Boolean receiveFirst, Byte[] reAuthenticationData, CancellationToken cancellationToken)
        /_/src/libraries/Common/tests/System/Net/Http/LoopbackServer.cs(476,0): at System.Net.Test.Common.LoopbackServer.Connection.CreateAsync(SocketWrapper socket, Stream stream, Options httpOptions)
        /_/src/libraries/Common/tests/System/Net/Http/LoopbackServer.cs(148,0): at System.Net.Test.Common.LoopbackServer.EstablishConnectionAsync()
        /_/src/libraries/Common/tests/System/Net/Http/LoopbackServer.cs(159,0): at System.Net.Test.Common.LoopbackServer.AcceptConnectionAsync(Func`2 funcAsync)
        /_/src/libraries/Common/tests/System/Threading/Tasks/TaskTimeoutExtensions.cs(120,0): at System.Threading.Tasks.TaskTimeoutExtensions.GetRealException(Task task)

@maraf maraf reopened this Jun 7, 2022
@antonfirsov
Copy link
Member

Duplicate of #69238.

@karelz karelz modified the milestones: 6.0.0, 7.0.0 Aug 7, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-System.Net.Http test-run-core Test failures in .NET Core test runs
Projects
None yet
Development

No branches or pull requests

7 participants