dotnet / AspNetCore.Docs

Documentation for ASP.NET Core
https://docs.microsoft.com/aspnet/core
Creative Commons Attribution 4.0 International
12.64k stars 25.29k forks source link

WinHttpException: A security error occurred #5019

Closed aous77 closed 6 years ago

aous77 commented 6 years ago

https://github.com/aspnet/Docs/blob/8e3f1ab85c5f2245d1e3146a57fc10ee19bd860e/aspnetcore/security/authentication/2fa/sample/Web2FA/Services/MessageServices_twilio.cs#L27-L41

getting the following error:

WinHttpException: A security error occurred
System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()

HttpRequestException: An error occurred while sending the request.
System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()

ApiConnectionException: Connection Error: POSThttps://api.twilio.com/2010-04-01/Accounts/.../Messages.json
Twilio.Clients.TwilioRestClient+<RequestAsync>d__13.MoveNext()
Rick-Anderson commented 6 years ago

Looks like a connection problem with Twilio.

Rick-Anderson commented 6 years ago

@aous77 you might try contacting Twilio. BTW, we recommend QR for 2FA.

aous77 commented 6 years ago

Yes, thx for the recommendation but I’m offering both options for 2fa, I had a similar issue with external auth connections and the solution was to attach the certificate to the http client. is there a way to override the http client handler for this connection?

Rick-Anderson commented 6 years ago

@HaoK can you comment?