While adding a HTTPS enabled WCF Service as Service reference through Visual Studio 2010 IDE, the following exception occured
There was an error downloading 'https://abc.cloudapp.net/DataService.svc'. The request failed with HTTP status 403: Forbidden. Metadata contains a reference that cannot be resolved: 'https://abc.cloudapp.net/DataService.svc'. The HTTP request was forbidden with client authentication scheme 'Anonymous'. The remote server returned an error: (403) Forbidden. If the service is defined in the current solution, try building the solution and adding the service reference again.
Please suggest me a solution for this.
Another possible solution is to make sure that Visual Studio knows which certificate to use by setting it in credential manager.
Open credential manager and under Certificate-Base credentials click Add a certificate-based credential.
Enter the URL of your service reference and select the certificate from the store.
The issue is the metadata binding. You must allow https GET to use the same URL for metadata and the service itself.
<serviceMetadata httpsGetEnabled="true" />
This will allow WCF to serve the metadata over HTTPS.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With