Member
Posts: 2
Registered: ‎05-09-2018
Accepted Solution
Could not create SSL/TLS secure channel

We are running identical code in our test and production environments.

In production, there is no problem.

In test, after years of having no problems, we are now seeing this error message:

"System.Net.WebException: The request was aborted: Could not create SSL/TLS secure channel."

 

We just noticed this today, when testing something unrelated, so we can't say how long it has been a problem in the test environment, but certainly no more than a few months.

 

I understand from tech support that Authorize.Net updated certificates recently, but it has had no impact on our production environment, which calls into the same URL, using identical code: Snippet

https://secure.authorize.net/gateway/transact.dll

 

We have gone so far as to import cypher registry settings from the production server to the test server, and disable all of the options except TLS 1.2, yet still we get this error (again, only on our test server).

 

We are at a loss as to how we can address this, and are very concerned that we might eventually face the same problem in our production environment. Can anyone help?

 

If useful, our C# code, in relevant part:

Snippet

private static string url = "https://secure.authorize.net/gateway/transact.dll ";
 
 
		public static AuthorizeResponse SendRequest(AuthorizeRequest transaction)
		{
			string strPost = transaction.ToString();
 
			StreamWriter myWriter = null;
 
			HttpWebRequest objRequest = (HttpWebRequest)WebRequest.Create(url);
			objRequest.AuthenticationLevel = System.Net.Security.AuthenticationLevel.MutualAuthRequired;
			objRequest.Method = "POST";
			objRequest.ContentLength = strPost.Length;
			objRequest.ContentType = "application/x-www-form-urlencoded";
 
			try
			{
                myWriter = new StreamWriter(objRequest.GetRequestStream(), Encoding.Default);
				myWriter.Write(strPost);
			}
			catch (Exception e)
			{       
                throw e;	
			}
			finally
			{
                if (myWriter != null)
                {
                    myWriter.Flush();
                    myWriter.Close();
                }
			}
 
			string result = string.Empty;
 
			HttpWebResponse objResponse = (HttpWebResponse)objRequest.GetResponse();

 

 

Who Me Too'd this topic