Skip to content
This repository has been archived by the owner on Feb 7, 2020. It is now read-only.

The underlying connection was closed: An unexpected error occurred on a send. #41

Closed
kellyrford opened this issue Jul 24, 2019 · 7 comments

Comments

@kellyrford
Copy link

Followed the example to the letter and the above error message was returned for all calls to httpClient.PostAsync.

Finally resolved the problem. Need to add this line above the call:

ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls12;

@jmprieur
Copy link
Contributor

Hi @kellyrford : this is not the right fix. See https://docs.microsoft.com/en-us/dotnet/framework/network-programming/tls
What we need to do is change the project to be a .NET Framework to be 4.7+
cc: @kalyankrishna1 @TiagoBrenck

@TiagoBrenck
Copy link
Contributor

@jmprieur this sample is already .NET 4.7.2. Check this PR: 14f9136

@jmprieur
Copy link
Contributor

@kellyrford : did you change the version of the .NET framework in the project?
cc: @TiagoBrenck

@kellyrford
Copy link
Author

kellyrford commented Jul 25, 2019 via email

@TiagoBrenck
Copy link
Contributor

TiagoBrenck commented Jul 26, 2019

@kellyrford I believe you are having this problem when you deploy to Azure right?
On the step to create the web app resource, Azure AD asks you to select a Runtime stack. What option did you choose?

@TiagoBrenck
Copy link
Contributor

@kellyrford should I close this issue?

@kellyrford
Copy link
Author

kellyrford commented Aug 26, 2019 via email

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants