cancel
Showing results for 
Search instead for 
Did you mean: 

System.Net.WebException The underlying connection was closed: An unexpected error occurred on a send

I use C# examples and use the source code for CreateCustomerProfile: http://developer.authorize.net/api/reference/#customer-profiles

 

I use only code from this example and I have the exception "System.Net.WebException" in string

controller.Execute();

 

Can anyone help me? 

3 REPLIES 3

What version of the .Net framework are you using? If you are using .Net framework 4.5, try adding the following at the beginning of the function where you make a webrequest: 

System.Net.ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls12 | SecurityProtocolType.Tls11 | SecurityProtocolType.Tls;
Powered by NexWebSites.com -
Certified Authorize.net developers
NexusSoftware
Trusted Contributor

Thank you very much!))) Your additional code has helped me. I use .NET framework 4.5.2

Very good. You are welcome.
Powered by NexWebSites.com -
Certified Authorize.net developers