none
Could not find a base address that matches scheme https for the endpoint with binding WSHttpBinding. Registered base address schemes are [http]. RRS feed

  • Question

  • I have created a WCF service and it uses windows AD group authentication. It works fine when I use basicHttpBinding in config in the deployed as expected. Now I have a requirement to use wsHttpBinding. I have the following configurations on my service web.config. But getting the some error when I try to browse my service after deployment 'Could not find a base address that matches scheme https for the endpoint with binding WSHttpBinding. Registered base address schemes are [http].'

    <

    system.serviceModel>

        <

    services>

          <

    servicebehaviorConfiguration="TestBehavior"name="TestNamespace.TestService">

            <

    host>

              <

    baseAddresses>

                <

    addbaseAddress="https://localhost:51/TestService.svc"/>

              </

    baseAddresses>

            </

    host>

            <

    endpointaddress=""  binding="wsHttpBinding"bindingConfiguration="TestBinding"name="TestEndpoint"contract="TestNamespace.ITestService"/>

            <

    endpointaddress="mex"binding="mexHttpBinding"contract="IMetadataExchange"/>

          </

    service>

        </

    services>

        <

    bindings>

          <!--

    wsHttpBinding-->

          <

    wsHttpBinding>

            <

    bindingname="TestBinding">

              <

    securitymode="TransportWithMessageCredential">

                <

    transportclientCredentialType="Windows"/>

              </

    security>

            </

    binding>

          </

    wsHttpBinding>

        </

    bindings>

        <

    behaviors>

          <

    serviceBehaviors>

            <

    behaviorname="TestBehavior">

              <!--

    To avoid disclosing metadata information, set the values below to false before deployment -->

              <

    serviceMetadatahttpGetEnabled="true"httpsGetEnabled="true"policyVersion="Policy15"/>

              <!--

    To receive exception details in faults for debugging purposes, set the value below to true.  Set to false before deployment to avoid disclosing exception information -->

              <

    serviceDebugincludeExceptionDetailInFaults="false"/>

              <!--

    <globalErrorHandler/>-->

              <

    serviceAuthorizationprincipalPermissionMode="UseWindowsGroups"/>

              <

    serviceAuthenticationManagerauthenticationSchemes="Negotiate"/>

            </

    behavior>

          </

    serviceBehaviors>

        </

    behaviors>

        <

    protocolMapping>

          <

    addbinding="wsHttpBinding"scheme="https"/>

        </

    protocolMapping>



        <

    serviceHostingEnvironment  multipleSiteBindingsEnabled="true"/>

      </

    system.serviceModel>

    I tried searching a lot of MS forums and didn't help for the last couple of days. kindly help me in figuring out/ possible solution to this issue.

    I doubt whether wsHttpBinding support http or only https.

    Thanks in advance.


    • Edited by Noelle14 Monday, May 23, 2016 2:17 PM
    Monday, May 23, 2016 2:12 PM

Answers

  • Hi Noelle14,

    >>I doubt whether wsHttpBinding support http or only https.

    wsHttpBinding supports both of the http and https.

    In order to create a wsHttpBinding with the Https WCF Service, please make sure that you have done the following things:
    a.We need to set the httpsGetEnabled as true<You have already done>

    b.We need to use the mexHttpsBinding instead of mexHttpBinding for the Metadata Exchange
    <endpoint address="mex" binding="mexHttpsBinding" contract="IMetadataExchange"/>

    c.We need to add the Https site binding in the IIS by opening IIS manager->click your website->Bindings->Add->Add Https Binding:

    PS:Based on the error information, it seems that you have missed this step.


    d.We need to configure the SSL certificate as showed in the following article:
    #How to: Configure an IIS-hosted WCF service with SSL
    https://msdn.microsoft.com/en-us/library/hh556232(v=vs.110).aspx .

    Besides, please also try to check the following article for more details:
    #Seven simple steps to enable HTTPS on WCF wsHttpBinding:
    http://www.codeproject.com/Articles/36705/simple-steps-to-enable-HTTPS-on-WCF-WsHttp-bindi .

    Best Regards,
    Amy Peng

    This response contains a reference to a third party World Wide Web site. Microsoft is providing this information as a convenience to you. Microsoft does not control these sites and has not tested any software or information found on these sites; therefore, Microsoft cannot make any representations regarding the quality, safety, or suitability of any software or information found there. There are inherent dangers in the use of any software found on the Internet, and Microsoft cautions you to make sure that you completely understand the risk before retrieving any software from the Internet.


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    • Marked as answer by Noelle14 Thursday, May 26, 2016 10:15 AM
    Tuesday, May 24, 2016 5:47 AM
    Moderator

All replies

  • Hi Noelle14,

    >>I doubt whether wsHttpBinding support http or only https.

    wsHttpBinding supports both of the http and https.

    In order to create a wsHttpBinding with the Https WCF Service, please make sure that you have done the following things:
    a.We need to set the httpsGetEnabled as true<You have already done>

    b.We need to use the mexHttpsBinding instead of mexHttpBinding for the Metadata Exchange
    <endpoint address="mex" binding="mexHttpsBinding" contract="IMetadataExchange"/>

    c.We need to add the Https site binding in the IIS by opening IIS manager->click your website->Bindings->Add->Add Https Binding:

    PS:Based on the error information, it seems that you have missed this step.


    d.We need to configure the SSL certificate as showed in the following article:
    #How to: Configure an IIS-hosted WCF service with SSL
    https://msdn.microsoft.com/en-us/library/hh556232(v=vs.110).aspx .

    Besides, please also try to check the following article for more details:
    #Seven simple steps to enable HTTPS on WCF wsHttpBinding:
    http://www.codeproject.com/Articles/36705/simple-steps-to-enable-HTTPS-on-WCF-WsHttp-bindi .

    Best Regards,
    Amy Peng

    This response contains a reference to a third party World Wide Web site. Microsoft is providing this information as a convenience to you. Microsoft does not control these sites and has not tested any software or information found on these sites; therefore, Microsoft cannot make any representations regarding the quality, safety, or suitability of any software or information found there. There are inherent dangers in the use of any software found on the Internet, and Microsoft cautions you to make sure that you completely understand the risk before retrieving any software from the Internet.


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    • Marked as answer by Noelle14 Thursday, May 26, 2016 10:15 AM
    Tuesday, May 24, 2016 5:47 AM
    Moderator
  • Thanks Amy, Its worked :)
    Thursday, May 26, 2016 10:15 AM