Calling a web service through a reverse proxy

Posted by Ken on Geeks with Blogs See other posts from Geeks with Blogs or by Ken
Published on Thu, 05 Jul 2012 06:39:18 GMT Indexed on 2012/07/05 15:16 UTC
Read the original article Hit count: 199

Filed under:

I had a w/s that when I first read the WSDL in test, was http, but needed to be accessed from behind a reverse proxy with https.  Here are the steps:

      1. Change the app.config, <httpTransport> to <httpsTransport>
      2. Change the app.config and the url address in the <endpoint>to the reverse proxy address
      3. Add System.Net.ServicePointManager.ServerCertificateValidationCallback = delegate { return true; };  to disable certificate validation.  This will validate all certificates (including invalid, expired or self-signed ones).

© Geeks with Blogs or respective owner