How to configure a single WCF Service to have multiple HTTP and HTTPS endpoints?

前端 未结 5 951
不思量自难忘°
不思量自难忘° 2020-12-28 10:08

What I am trying to do is get a SINGLE WCF Service to work in the development environment which is the HTTP scheme, and, also, have the SAME service work in the production e

5条回答
  •  谎友^
    谎友^ (楼主)
    2020-12-28 10:41

    There are lots of reasons you can get the error:

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

    Most of the reasons are from the Web.config settings, but it could be from IIS. I had the same problems, if you defended Endpoints with both http and https bindings, you have to create http and https binding for the website you created in IIS->Site->Bindings, otherwise you will get this error.

提交回复
热议问题