c# - An error occurred while making the HTTP request to https -> Handshake failed -
i consuming webservice using basichttpsbinding
follows
excclient createclient() { var binding = new system.servicemodel.basichttpsbinding(); binding.readerquotas.maxarraylength = int.maxvalue; binding.maxreceivedmessagesize = int.maxvalue; binding.usedefaultwebproxy = false; var endpoint = new system.servicemodel.endpointaddress("https://{sitename}/{service}"); var client = new excclient(binding, endpoint); homecoming client; //return new excclient(); }
the consuming site hosted on iis 7.5 , has multiple sites located on server. using .net forms site calling code looks following
var x = service.client.getresults({parameter});
when running service homecoming results 15 minutes , begins error.
an error occurred while making http request https://{sitename}/{service}/. due fact server certificate not configured http.sys in https case. caused mismatch of security binding between client , server
the underlying connection closed: unexpected error occurred on send. ---> system.io.ioexception: handshake failed due unexpected packet format.
if recycle app pool site service begins homecoming results 1 time again 15 minutes , begins failing again. app pool has no memory limitations set on it.
the app.config
looks
<bindings> <basichttpbinding> <binding name="basichttpbinding_exc"> <security mode="transport" /> </binding> <binding name="basichttpbinding_exc1" /> </basichttpbinding> </bindings> <client> <endpoint address="https://vadrs.tax.utah.gov/vdx/" binding="basichttpsbinding" bindingconfiguration="basichttpbinding_exc" contract="utvehicleservices.exc" name="basichttpbinding_exc" /> </client>
the reply question found in post "how disable ssl fallback , utilize tls outbound connections in .net? (poodle mitigation)". had other web service calls setting next code no fall back
system.net.servicepointmanager.securityprotocol = system.net.securityprotocoltype.ssl3;
i had set protocol type tls mentioned in answering post.
c# wcf basichttpbinding
No comments:
Post a Comment