Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

http wcf error "Could not find a base address that matches scheme https for the endpoint with binding MetadataExchangeHttpsBinding..."

am getting this error when i try to call my custom svc file from sharpoint. i have posted my web.config file here, could you guys tell wats wrong with this.

am trying to have my custom webservice in the sharepoint, so i created a project but due to this error i could not browse my web methods.

<?xml version="1.0"?>
<configuration>
  <system.serviceModel>
    <services>
      <service behaviorConfiguration="AlertWcfService.CustomServiceBehaviour"
        name="AlertWcfService.AlertService">
        <endpoint address="http://localhost:2000/" binding="basicHttpBinding" bindingConfiguration="basicHttpBindingConfiguration"
                  contract="AlertWcfService.IAlertService" >
          <identity>
            <dns value="localhost" />
          </identity>
        </endpoint>
        <endpoint address="mex" binding="mexHttpsBinding" contract="IMetadataExchange" />
        <host>
          <baseAddresses>
            <add baseAddress="http://localhost:2000/"></add>
          </baseAddresses>
        </host>
      </service>
    </services>
    <bindings>
      <basicHttpBinding>
        <binding name="basicHttpBindingConfiguration">
          <security mode="Transport">
            <transport clientCredentialType="None" proxyCredentialType="None" realm=""/>
            <message clientCredentialType="Certificate" algorithmSuite="Default" />
          </security>
        </binding>
      </basicHttpBinding>
    </bindings>
    <behaviors>
      <serviceBehaviors>
        <behavior name="AlertWcfService.CustomServiceBehaviour">
          <!--<serviceMetadata httpsGetEnabled="false"/>-->
          <serviceMetadata httpGetEnabled="false" httpsGetEnabled="false"/>
          <serviceDebug includeExceptionDetailInFaults="false"/>
        </behavior>
      </serviceBehaviors>
    </behaviors>
  </system.serviceModel>
</configuration>
like image 504
5181john Avatar asked Aug 30 '26 19:08

5181john


1 Answers

The error is that you're not using HTTPS, but you're using an MEX binding for HTTPS rather than HTTP. TO fix this, change this line:

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

To

    <endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange" />
like image 73
tomasr Avatar answered Sep 04 '26 05:09

tomasr



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!