c# - The client and server cannot communicate, because they do not possess a common algorithm -


I have a problem with the C # patrease gateway The codes given below were working fine until I believe That SSL3 was discontinued due to poodle exploitation. We got the following message after running the code below. The remote server has forced the connection to close. After doing some research on this problem, we have determined that because our IIS Server 7.5 was still configured to use SSL3, we missed the C # SSL3, which will stop the forced transaction connection. Removed SSL3 from server. Following is the following error:

Customers and servers can not communicate, because they do not have a common algorithm.

I guess there are additional SSL algorithms that we need to install on the server that SSL 3 has been removed. Our IT staffs claim that TLS 1.1 and TLS 1.2 are working and ASP.net should now default to those people. But I think there should still be something else which we need to install on the server, I have no knowledge of the SSL algorithm, so I do not know where to start

  Var postUrl = new stringbilder (); // Start the URL with configuration and parameter values ​​... postUrl.AppendFormat ("un ~ {0} |", this.MerchantLoginID); PostUrl.AppendFormat ("PSWD ~ {0} |", this MerchantTransactionKey); PostUrl.Append ("Rule ~ Y | Method ~ ProcessTranx | TRANXTYPE ~ Sales |"); PostUrl.AppendFormat ("cc ~ {0} |", card number); PostUrl.AppendFormat ("EXPMNTH ~ {0} |", Expiration .pad left (2, '0')); PostUrl.AppendFormat ("EXPYR ~ {0} |", Expiration year); PostUrl.AppendFormat ("AMOUNT ~ {0} |", transaction amount); PostUrl.AppendFormat ("BADDRESS ~ {0} |", this.AddressLine1); PostUrl.AppendFormat ("BADDRESS2 ~ {0} |", this.AddressLine2); PostUrl.AppendFormat ("BCITY ~ {0} |", this.City); PostUrl.AppendFormat ("BSTATE ~ {0} |", this.State); PostUrl.AppendFormat ("BZIP ~ {0} |", this.Zip); PostUrl.AppendFormat ("SADDRESS ~ {0} |", this.AddressLine1); PostUrl.AppendFormat ("SADDRESS2 ~ {0} |", this.AddressLine2); PostUrl.AppendFormat ("SCITY ~ {0} |", this.City); PostUrl.AppendFormat ("SSTATE ~ {0} |", this.state); PostUrl.AppendFormat ("SZIP ~ {0} |", this.Zip); If (! String.IsNullOrEmpty (this command)) {postUrl.AppendFormat ("BCOUNTRY ~ {0} |", this.ountry); } If (! String.IsNullOrEmpty (this.Description)) {postUrl.AppendFormat ("DESCRIPTION ~ {0} |", this.Description); } If (! String.IsNullOrEmpty (this.InvoiceNumber)) {postUrl.AppendFormat ("INVOICE ~ {0} |", this.InvoiceNumber); } If (this.IsTestMode) {postUrl.AppendFormat ("test ~ y"); } //postUrl.Append (); Webclient wClient = new webclient (); ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls; String sRequest = "PARMLIST =" + Url.Encode (postUrl.ToString ()); WClient.Headers.Add ("content-type", "app / x-www-form-urxed"); String sResponse = ""; SResponse = wClient.UploadString (PayTraceUrl, sRequest); Apart from this, only one FYI, this issue is happening even when we connect the first data to the E4 gateway, so it is not just about Petrace. My guess is that the more entrances to the SSL gateway are closed, the more gateways will continue to run in issues unless it can be resolved on the server. Also, I have found some suggestions online, some have suggested that before entering outbound requests, enter the following code:  
  ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls;  

Unfortunately, either, the same error did not work. That is why I am thinking of installing some additional requirements on the IIS7.5 server. I just can not believe what happened

There are many more posts about this now, but they are all TLS 1.2 says to enable it Nothing less is insecure

You can do this with patch in .NET 3.5.
You can do it with a line of code in .NET 4.0 and 4.5

  ServicepointManager. Security Protocol = SecurityTutorial Type Tls12; // .NET 4.5ServicePointManager Security Protocol = (Security Protocol Type) 3072; // .NET 4.0  

In .NET 4.6, it automatically uses TLS 1.2.

For more information see here:


Comments

Popular posts from this blog

apache - 504 Gateway Time-out The server didn't respond in time. How to fix it? -

c# - .net WebSocket: CloseOutputAsync vs CloseAsync -

c++ - How to properly scale qgroupbox title with stylesheet for high resolution display? -