You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When testing locally using a project that issues HTTP POST requests from a program created in Visual Studio, ie: using System.Net.Http.HttpClient, HttpClient always returns:
System.Net.Http.HttpRequestException: An error occurred while sending the request. ---> System.Net.WebException: Unable to connect to the remote server ---> System.Net.Sockets.SocketException: No connection could be made because the target machine actively refused it 127.0.0.1:7170
I can make POST requests using PostMan or GET requests using a browser, but when trying to test functions locally using System.Net.Http.HttpClient calls from within Visual Studio -- it seems impossible, due to the error above.
I also tried to set the following within Web.Config (suggested in a StackOverFlow post):
<system.net>
</system.net>
No effect !
HOW can I test functions locally from programs running within Visual Studio -- specifically, when using System.Net.Http.HttpClient -- please provide an example.
Document Details
⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.
ID: a571957f-41ce-e7ea-5f0b-1aefb8b219fa
Version Independent ID: 6c676eb8-581c-c5c5-0047-c7a7531fa423
When testing locally using a project that issues HTTP POST requests from a program created in Visual Studio, ie: using System.Net.Http.HttpClient, HttpClient always returns:
System.Net.Http.HttpRequestException: An error occurred while sending the request. ---> System.Net.WebException: Unable to connect to the remote server ---> System.Net.Sockets.SocketException: No connection could be made because the target machine actively refused it 127.0.0.1:7170
I can make POST requests using PostMan or GET requests using a browser, but when trying to test functions locally using System.Net.Http.HttpClient calls from within Visual Studio -- it seems impossible, due to the error above.
I also tried to set the following within Web.Config (suggested in a StackOverFlow post):
<system.net>
</system.net>
No effect !
HOW can I test functions locally from programs running within Visual Studio -- specifically, when using System.Net.Http.HttpClient -- please provide an example.
Document Details
⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.
The text was updated successfully, but these errors were encountered: