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

    Question

  • I created WCF application and want to get wsdl. I get this error :"

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

    Here is my web.config

    <system.serviceModel>
        <services>
          <service behaviorConfiguration="ServiceApp.Service1Behavior" name="ServiceApp.Service">
            <host>
              <baseAddresses> 
                <add baseAddress="https://10.0.0.17/Service.svc"/>
              </baseAddresses>
            </host>
            <endpoint address="" binding="wsHttpBinding" bindingConfiguration="TransportSecurity" contract="ServiceApp.IService"/>
            <endpoint address="mex" binding="mexHttpsBinding" contract="IMetadataExchange"/>
          </service>
        </services>
        <bindings>
          <wsHttpBinding>
            <binding name="TransportSecurity">
              <security mode="Transport">
                <transport clientCredentialType="None"/>
              </security>
            </binding>
          </wsHttpBinding>
        </bindings>
        <behaviors>
          <serviceBehaviors>
            <behavior name="ServiceApp.Service1Behavior">
              <serviceMetadata httpsGetEnabled="true"/>
              <serviceDebug includeExceptionDetailInFaults="false"/>
            </behavior>
          </serviceBehaviors>
        </behaviors>
      </system.serviceModel>

    What should I do not to have  this error and to get wsdl (using HTTPS) ?



    Tuesday, October 15, 2013 1:07 PM

Answers

  • Hi,
    If you are getting “Could not find a base address that matches scheme https for the endpoint with binding WSHttpBinding. Registered base address schemes are [http]”” error while running the service in local. Then host the service on IIS and test your service from there.
    To test the service on IIS you need to do some configuration changes in IIS. Following are the steps for hosting the service on IIS and doing the configuration changes.

                        I.            Open IIS. Right click on default app pool select Add application.

     

                      II.            Now you will get a pop up window. Type the app name and select yours WCF service project path and in Application Pool select default App Pool and click on Ok.

                   III.            Select the newly added Application double click on  directory browsing. From the directory browsing setting click on “Enable”

     

                    IV.            Now select default document.
     From the default document settings click on “Add” you will get a pop up type the name of you service ex. TestWcfService.svc and hit ok button.

                      V.            Select default app pool. From the default app pool setting click on Binding.
     Now add the https binding with following details. Type=https, IPaddress=unassigned, Port=443 and SSL Certificaet=<select your certifiace which you have added in the WCF web role settings>.

     

                    VI.             Now select your application and double click on SSL Settings.

    Check the Require SSL option and select Accept in client certificates.

     

                 VII.            To test the service right click on you application select manage application and click on Browse. After clicking on brows your browser will open  and if you get “HTTP Error 403.4 – Forbidden The page you are trying to access is secured with Secure Sockets Layer (SSL).” error
     Then in the address bar type the following url – https://localhost/<your application name>/<your servicename.svc> and hit enter.

    3>     After following above steps instead of 403.4 error you are getting “Error 500.21 Handler "svc-Integrated" has a bad module "ManagedPipelineHandler" in its module list" error the follow the below steps.

                                                I.            Open Visual Studio Command Prompt

                                              II.            Type the following:

    a.       aspnet_regiis.exe -i

                                           III.            Run the command

                                            IV.            Try your service again.

    This basically installs the necessary ASP pieces to get your service up and working!


    Wednesday, November 06, 2013 2:54 AM

All replies

  • Hi,
    >>https with WCF error: "Could not find a base address that matches scheme https for the endpoint with binding WSHttpBinding. Registered base address schemes are [http]."

    In order to use the https with transport security. We should configure this IIS-hosted WCF service with SSL, here are the steps, please try to refer to:
    1. Creating a Self-Signed Certificate
    2. Add SSL Binding
    3. Configure Virtual Directory for SSL
    4. Finally you need to configure the WCF service to use HTTPS

    For more information, please try to refer to:
    #How to: Configure an IIS-hosted WCF service with SSL:
    http://msdn.microsoft.com/en-us/library/hh556232.aspx .

    Best Regards,
    Amy Peng


    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.

    Wednesday, October 16, 2013 7:13 AM
    Moderator
  • I did changes mantioned in http://msdn.microsoft.com/en-us/library/hh556232.aspx . Unfortunately it doesnot help me.
    Wednesday, October 16, 2013 1:07 PM
  • Hi,
    If you are getting “Could not find a base address that matches scheme https for the endpoint with binding WSHttpBinding. Registered base address schemes are [http]”” error while running the service in local. Then host the service on IIS and test your service from there.
    To test the service on IIS you need to do some configuration changes in IIS. Following are the steps for hosting the service on IIS and doing the configuration changes.

                        I.            Open IIS. Right click on default app pool select Add application.

     

                      II.            Now you will get a pop up window. Type the app name and select yours WCF service project path and in Application Pool select default App Pool and click on Ok.

                   III.            Select the newly added Application double click on  directory browsing. From the directory browsing setting click on “Enable”

     

                    IV.            Now select default document.
     From the default document settings click on “Add” you will get a pop up type the name of you service ex. TestWcfService.svc and hit ok button.

                      V.            Select default app pool. From the default app pool setting click on Binding.
     Now add the https binding with following details. Type=https, IPaddress=unassigned, Port=443 and SSL Certificaet=<select your certifiace which you have added in the WCF web role settings>.

     

                    VI.             Now select your application and double click on SSL Settings.

    Check the Require SSL option and select Accept in client certificates.

     

                 VII.            To test the service right click on you application select manage application and click on Browse. After clicking on brows your browser will open  and if you get “HTTP Error 403.4 – Forbidden The page you are trying to access is secured with Secure Sockets Layer (SSL).” error
     Then in the address bar type the following url – https://localhost/<your application name>/<your servicename.svc> and hit enter.

    3>     After following above steps instead of 403.4 error you are getting “Error 500.21 Handler "svc-Integrated" has a bad module "ManagedPipelineHandler" in its module list" error the follow the below steps.

                                                I.            Open Visual Studio Command Prompt

                                              II.            Type the following:

    a.       aspnet_regiis.exe -i

                                           III.            Run the command

                                            IV.            Try your service again.

    This basically installs the necessary ASP pieces to get your service up and working!


    Wednesday, November 06, 2013 2:54 AM