Unable to read data from the transport connection: An existing connection was forcibly closed by the remote host

Ghanshyam Bosmiya 20 Reputation points
2024-07-03T09:38:55.6966667+00:00

I am using azure .net sdk to get resources from azure subscription account

specifically i am making getresources call using IAuthenticated(Credetials)

IAuthenticated.WithSubscription(SubscriptionId).GenericResources.List()

I was getting below error

The SSL connection could not be established, see inner exception.2024-06-27T09:38:35.3051093-04:00 [ERR] ("") Unable to read data from the transport connection: An existing connection was forcibly closed by the remote host..System.IO.IOException: Unable to read data from the transport connection: An existing connection was forcibly closed by the remote host..---> System.Net.Sockets.SocketException (10054): An existing connection was forcibly closed by the remote host.   --- End of inner exception stack trace ---   at System.Net.Sockets.Socket.AwaitableSocketAsyncEventArgs.ThrowException(SocketError error, CancellationToken cancellationToken)   at System.Net.Sockets.Socket.AwaitableSocketAsyncEventArgs.System.Threading.Tasks.Sources.IValueTaskSource

.NET
.NET
Microsoft Technologies based on the .NET software framework.
3,905 questions
{count} votes

Accepted answer
  1. PRADEEPCHEEKATLA-MSFT 90,146 Reputation points Microsoft Employee
    2024-07-22T10:54:31.5366667+00:00

    @Ghanshyam Bosmiya I'm glad that you were able to resolve your issue and thank you for posting your solution so that others experiencing the same thing can easily reference this! Since the Microsoft Q&A community has a policy that "The question author cannot accept their own answer. They can only accept answers by others ", I'll repost your solution in case you'd like to accept the answer .

    Ask: Unable to read data from the transport connection: An existing connection was forcibly closed by the remote host

    Solution: The issue is resolved. I have fixed the problem with the help of https://learn.microsoft.com/en-us/dotnet/azure/sdk/azure-sdk-configure-proxy?tabs=cmd

    If I missed anything please let me know and I'd be happy to add it to my answer, or feel free to comment below with any additional information.

    If you have any other questions, please let me know. Thank you again for your time and patience throughout this issue.


    Please don’t forget to Accept Answer and Yes for "was this answer helpful" wherever the information provided helps you, this can be beneficial to other community members.

    1 person found this answer helpful.
    0 comments No comments

0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.