How to configure WCF services to work through HTTPS without HTTP binding?

I have configured my WCF services to work with SSL but it works ONLY if the HTTP binding exists in the IIS Web Site. When the HTTP binding not exists and exists only HTTPS binding I get the following error:

The HttpGetEnabled property of ServiceMetadataBehavior is set to true and the HttpGetUrl property is a relative address, but there is no http base address. Either supply an http base address or set HttpGetUrl to an absolute address.

How can I resolve this issue?

Thanks.

Answers


Modify your configuration this way:

<behaviors>
  <serviceBehaviors>
    <behavior> <!-- behavior can have name (must have name in WCF 3.x) -->
      <serviceMetadata httpGetEnabled="false" httpsGetEnabled="true" />
    </behavior>
  </serviceBehaviors>
</behaviors>

you need to use mexHTTPSBinding unstead of mexHTTPBinding

<endpoint address="mex" binding="mexHttpsBinding" contract="IMetadataExchange" />

Need Your Help

Behaviour of imeOptions, imeActionId and imeActionLabel

android android-input-method

I'm quite new to Android native development, and I'm trying to figure out how to customize the IME action buttons. I've looked at the Google documentation, but I can find very few information about...

Solr: Retrieve field names from a solr index?

solr

How can I query a solr instance for all (or prefixed) field names?