1
votes

I have an HTTPS webserver on WCF hosted under IIS 7.5. I have set the SSL settings to require SSL and ignore client certificates.

When I try to add the web reference in Visual Studio, I get the following error. How do I fix this problem?

I can see that it's trying to request ?disco using HTTP instead of HTTPS. I think this is the problem, but I am not sure how to address this.

The document at the url https://testserver/service1.svc?wsdl was not recognized as a known document type.
The error message from each known type may help you fix the problem:
- Report from 'DISCO Document' is 'There was an error downloading 'http://testserver/service1.svc?disco'.'.
- The request failed with HTTP status 403: Forbidden.
- Report from 'WSDL Document' is 'The document format is not recognized (the content type is 'text/html; charset=UTF-8').'.
- Report from 'XML Schema' is 'The document format is not recognized (the content type is 'text/html; charset=UTF-8').'.
- Report from 'https://testserver/service1.svc?wsdl' is 'The document format is not recognized (the content type is 'text/html; charset=UTF-8').'.

2
When you try to browse the url in your web browser testserver/service1.svc?wsdl what do you get?Anas Karkoukli
I do not receive any error i get to the page. i have the cert trusted on my rootNatasha Thapa

2 Answers

2
votes

Since you're able to get the WSDL through your web browser, a possible issue might be with hosting the service in IIS and configuring site bindings. It was a known issue on the forums some time ago, check out these links:

Good luck!

1
votes

I had to disable Require SSL to get it to work. I am not sure why disco goes to do an HTTP when the WSDL URL you provide is HTTPS.