Saturday 15 August 2015

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



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

i have issue c# paytrace gateway. below code working fine until yesterday when believe turned off ssl3 due poodle exploit. when running code below got next message. remote server has forcefully closed connection. after doing research on problem determined because our iis server 7.5 configured still utilize ssl3, c# defaulted ssl3, paytrace forcibly close connection. removed ssl3 server. lead next error:

the client , server cannot communicate, because not possess mutual algorithm.

my guess there additional ssl algorithm need install on server ssl 3 removed. our staff claims tls 1.1 , tls 1.2 working , asp.net should defaulting those. sense there still must else need install on server, have no knowledge of ssl algorithms have no thought begin.

var posturl = new stringbuilder(); //initialize url configuration , parameter values... posturl.appendformat("un~{0}|", this.merchantloginid); posturl.appendformat("pswd~{0}|", this.merchanttransactionkey); posturl.append("terms~y|method~processtranx|tranxtype~sale|"); posturl.appendformat("cc~{0}|", cardnumber); posturl.appendformat("expmnth~{0}|", expirationmonth.padleft(2, '0')); posturl.appendformat("expyr~{0}|", expirationyear); posturl.appendformat("amount~{0}|", transactionamount); 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.country)) { posturl.appendformat("bcountry~{0}|", this.country); } 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", "application/x-www-form-urlencoded"); string sresponse = ""; sresponse = wclient.uploadstring(paytraceurl, srequest);

also, fyi, issue happening when connect first info e4 gateway it's not paytrace thing. guess more gateways turn off access ssl3 we'll go on run issues other gateways until can resolved on server. also, did find few suggestions online, suggested placing next code right before making outbound request:

servicepointmanager.securityprotocol = securityprotocoltype.tls;

unfortunately did not work either, same error. why i'm thinking additional needs installed on iis7.5 server. i'm not sure what.

this resolved. turns out our staff correct. both tls 1.1 , tls 1.2 installed on server. however, issue our sites running asp.net 4.0 , have have asp.net 4.5 run tls 1.1 or tls 1.2. so, resolve issue, our staff had reenable tls 1.0 allow connection paytrace.

so in short, error message, "the client , server cannot communicate, because not possess mutual algorithm", caused because there no ssl protocol available on server communicate paytrace's servers.

c# asp.net ssl iis-7.5 poodle-attack

No comments:

Post a Comment