Amazon Ad

Wednesday, 25 September 2013

WCF Could not find a base address that matches scheme https for the endpoint with binding MetadataExchangeHttpBinding. Registered base address schemes are [http].

Hi Guys,

I was facing a problem while invoking a WCF web service which was actually made for SSL (Secure Socket Layer) and runs on the https protocol. My task was to run the webservice without SSL i.e on http.

Here is how i did the same

1. Under bindings tag make sure you comment the line <security mode="Transport" /> i.e,

    <bindings>
      <webHttpBinding>
        <binding name="myBinding" maxBufferSize="2147483647"  maxReceivedMessageSize="2147483647" >
          <readerQuotas  maxDepth="2147483647" maxStringContentLength="2147483647" maxArrayLength="2147483647"
            maxBytesPerRead="2147483647" maxNameTableCharCount="2147483647"/>
            <!--Commented This line-->
            <!--<security mode="Transport" />-->
        </binding>
      </webHttpBinding>

2. Comment the line <endpoint address="mex" binding="mexHttpsBinding" contract="IMetadataExchange"/> i.e,

<services>
    <service behaviorConfiguration="Mine.Services.MyServiceBehavior" name="Mine.Services.MyService">
        <endpoint address="" binding="webHttpBinding" contract="Mine.Services.IMyService" bindingConfiguration="myBinding">
                <identity>
                <dns value="localhost" />
                </identity>
        </endpoint>
                     <!--Commented This line-->
                <!--<endpoint address="mex" binding="mexHttpsBinding" contract="IMetadataExchange"/>-->
    </service>
</services>

And that's it folks, The service now runs on HTTP protocol.

Thanks
Ritesh

No comments:

Post a Comment

Comments are welcome, Please join me on my Linked In account

http://in.linkedin.com/pub/ritesh-tandon/21/644/33b

How to implement Captcha v3 in ASP.NET

 I was facing an issue of dom parsing in my website. I finally resolved it by using Google Captcha V3. Step 1: Get your keys from https:...