Configuring a WCF service (Web.config) - HttpsGetEnabled, HttpsGetUrl
This error happened because the setting is logically wrong. If you enable the httpsGetEnabled means, you allow clients to retrieve metadata via https. And if you don't provide a URL about https, how can clients retrieve metadata from https. So the error message alert you to provide a URL.
Either supply an https base address or set HttpsGetUrl to an absolute address.
You have three options.
- Provide httpsGetUrl as other answers showed above
- Binding an address via IIS
(if you are still developing in visual studio then you only need to degug with SSL Enabled mode )
Set httpsGetEnabled to false
Now it should be all correct, I just changed the httpGetEnabled and httpsGetEnabled in the proper place (it's already in the config file). But I still get the error. Should I perhaps specify the HttpsGetUrl somewhere? Where?
Yes, see here.
Should be:
<behaviors>
<serviceBehaviors>
<behavior name="NewBehavior">
<serviceMetadata httpsGetEnabled="true"
httpsGetUrl="https://myComputerName/myEndpoint" />
</behavior>
</serviceBehaviors>
</behaviors>