• Register
0 votes

Problem :

I want to tell you that I have researched a lot for this issue but without a solution. I have created the loop that will go throw my listBox1 and that contains the links, each time creating the http GET request in order to access my full source code.

The error below is often triggered when my loop hits various of urls The weirdest thing is that if I try to remove my loop and make the http GET request to that site then everything works without any issue.

“A first chance exception of type 'System.Net.WebException' occurred in System.dll System.Net.WebException: The underlying connection was closed: An unexpected error occurred on a send. ---> System.IO.IOException: Authentication failed because the remote party has closed the transport stream.”

I don't consider that it's the problem with my certificate as otherwise I would still get the error when I removed my loop.

Any suggestions are highly appreciated.

6 5 3
7,540 points

Please log in or register to answer this question.

1 Answer

0 votes

Solution :

I had also faced the similar issue in the recent past. I did lot of research on it and found the solution on it. This is the very common problem with the people getting started.

This is happening due to the security protocol issue.

You need to just add the below line before your request context.

 ServicePointManager.SecurityProtocol = (SecurityProtocolType)3072;

This change will resolve your issue.

9 7 4
38,600 points

Related questions

0 votes
1 answer 115 views
Problem : I have recently installed a website on my local machine using IIS 7 successfully. But when I tried to deploy it on the live server, I got a following error: "The page cannot be displayed because an internal server error has occurred" Nothing else. Using a same IIS 7 on live and also set to have the Detailed errors in Error Pages module, but still getting a same. What can be the reason?
asked Jan 28, 2020 jwilliam 3.9k points
0 votes
1 answer 116 views
Problem : I am facing following c# socket issue the i/o operation has been aborted because of either a thread exit or an application request
asked Nov 16, 2019 peterlaw 6.9k points
0 votes
1 answer 12 views
0 votes
1 answer 385 views
Problem : Currently I am trying to display a JSON content using a API key. But I am unable to get a authentication. I am facing below error in my JsonObject: “Org.json.JSONException: Value Authorization of type java.lang.String cannot be converted to JSONObject” In my ... to pass a API key and URL id to get my JSON response in a URL. I display a JSON content using a JSON array.
asked Feb 2, 2020 jwilliam 3.9k points
0 votes
1 answer 13 views
0 votes
1 answer 56 views
Problem : I am using a SmtpClient library to send the emails using a below code : SmtpClient smtpclient = new SmtpClient(); smtpclient.Host = "hostname"; smtpclient.Port = 465; smtpclient.DeliveryMethod = SmtpDeliveryMethod.Network; smtpclient.UseDefaultCredentials = false; smtpclient. ... port opens just fine between a client and a server. I am not sure at all what else could throw above error.
asked Jan 29, 2020 jwilliam 3.9k points
0 votes
2 answers 307 views
Problem : I am running the AWS EC2 g2.2xlarge instance with my Ubuntu 14.04 LTS. I want to observe a GPU utilization while training the TensorFlow models. But I face the below error while trying to run the 'nvidia-smi'. ubuntu@ip-10-0-1-213:/etc/ ... smi NVIDIA-SMI has failed because it couldn't communicate with the NVIDIA driver. Make sure that the latest NVIDIA driver is installed and running.
asked Jan 23, 2020 jwilliam 3.9k points
0 votes
1 answer 42 views
Problem : I am beginner in C#. I am trying to write the Function using C#. But while executing my code I am facing below error “The connection was not closed. The connection's current state is open.” How to fix above error?
asked Feb 27, 2020 mphil 2.3k points