Thursday, February 23, 2012

SvcUtil and Https

A service I need to use for data retrieval recently changed its endpoint definition. The service switched from an HTTP endpoint to an HTTPS endpoint. Since the interface of the service changed as well, I needed to regenerate the interface definitions used to connect to the service.

So, I got out my favourite wsdl tool, svcutil.exe and tried to regenerate the interface definitions as I had done millions of times before. Only to find that the https endpoint was holding me back.


As my command prompt couldn't accept or reject the server's SSL certificate, the wsdl file could not be downloaded.

As a solution for this, you can do the following: Fire up Fiddler and change it's options to decrypt HTTPS traffic. This will add a Fiddler certificate to your certificate store, which is just fine by me.


I did not check the 'Ignore server certificate errors' option, since I still want to know what's going on when some process is going to an HTTPS site.

After setting these options and while Fiddler was silently running in the background, I tried out the svcutil command again. This gave me one more pop up (since I did not check the certificate errors option).



And my classes got generated just fine.

1 comment: