REST WCF Service Over SSL

后端 未结 3 723
长情又很酷
长情又很酷 2021-02-10 07:50

I am trying to configure a REST WCF service over SSL and I keep getting:

Could not find a base address that matches scheme https for the endpoint wit

相关标签:
3条回答
  • 2021-02-10 08:01

    Let me guess: You are running your service from Visual Studio in Developement web server (Cassini), don't you? Development web server does not support HTTPS. You have to host your service in IIS and follow Greg's advice to add HTTPS binding for the site.

    0 讨论(0)
  • 2021-02-10 08:11

    You need to add a https binding in IIS.

    1. Navigate to your site in IIS
    2. Click 'Bindings...' in the Actions panel on the right.
    3. Click 'Add'
    4. Select 'https' and select a certificate.
    0 讨论(0)
  • 2021-02-10 08:19

    Two choices:

    1. Specify the full address in the endpoints.

    2. Specify somewhere in the tag the base addresses used for the host, for example:

    <host>
      <baseAddresses>
        <add baseAddress="http://localhost:8000/service"/>
        <add baseAddress="https://localhost:8001/service"/>
      </baseAddresses>
    </host>
    
    0 讨论(0)
提交回复
热议问题