4

I need svcutil.exe to generate a proxy class for me, but the problem is that the web service can be accessed only via HTTPS and the SSL certificate is self signed.

How can I force svcutil.exe to ignore this issue?

Piotr Owsiak
  • 6,081
  • 8
  • 39
  • 42
  • 1
    This not directly the situation described in the question but the SSL certificate hostname mismatch (i.e. in a cluster scenario or a DNS suffix, etc.) can be worked around via svcutil.exe.config, you just need to add this: – Piotr Owsiak Sep 18 '12 at 09:57

5 Answers5

7

One thing that seemed to work was to fire up Fiddler and have it running as you make the SVCUTIL requests. Fiddler's cert is valid and seems to work fine.

Chad
  • 141
  • 1
  • 2
  • This certainly helped me. At least it did with the addition of the suggestion by @MattPll about ensuring the Decrypt HTTPS option is selected (at least, that is what worked for me). – Mr Moose Jul 25 '11 at 02:33
6

+1 for using fiddler. You just need to go to the TOOLS > Fiddler Options and check Decrypt HTTPS.

MattPII
  • 256
  • 3
  • 6
  • I think the suggestion of Decrypt HTTPS is important for this to work. It certainly helped me out. – Mr Moose Jul 25 '11 at 02:26
  • worked for me. wish our sysadmin's understood the beauty of a property implemented public key infrastructure. – JJS Nov 01 '11 at 22:30
4

You could try browsing to the https site first, ignore the warning that the certificate is not trusted, then click on the certificate and install it.

This should result in the machine you are working on trusting the certificate.

Then try running svcutil again.

Shiraz Bhaiji
  • 64,065
  • 34
  • 143
  • 252
0

Browse to the https site, ignore the warning, save the wsdl, and generate the client class directly from the wsdl

Rod
  • 1
  • I actually needed to run svcutil from another process. Shiraz Bhaiji's workaround worked well. I just made sure the certificate is installed, then svcutil run fine. – Piotr Owsiak Jan 20 '10 at 10:10
0

You can use curl with the --insecure flag to download the wsdl locally, then generate the classes from that.

curl --insecure "https://url_to_the_wsdl" >download.wsdl
svcutil.exe download.wsdl

Feel free to modify file names as appropriate, adding switches as required.

sscheider
  • 522
  • 5
  • 14