Piotr Owsiak
Piotr Owsiak

Reputation: 6249

Is there a way to force svcutil.exe to ignore SSL certificate issues?

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?

Upvotes: 4

Views: 15921

Answers (5)

sscheider
sscheider

Reputation: 532

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.

Upvotes: 0

MattPII
MattPII

Reputation: 256

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

Upvotes: 6

Chad
Chad

Reputation: 141

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.

Upvotes: 7

Rod
Rod

Reputation: 1

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

Upvotes: 0

Shiraz Bhaiji
Shiraz Bhaiji

Reputation: 65391

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.

Upvotes: 4

Related Questions