Question

Due to the nature of the tools that I need to use, I need to have access to a wcf service using both http and htpps.

Specifically, the service needs to be accessable through the following (base) urls:

Is it possible to do this in one service config and multiple endpoints?

The above cofiguration doesn't work for my service when I try to access it through localhost. Of course, the code tag around localhost is so I can submit my question.

Depending on what I adjust in the config I get a different error. But most of the time it's when I try to add an extra http endpoint next to an already existing https endpoint.

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

Or

The HttpGetEnabled property of ServiceMetadataBehavior is set to true and the HttpGetUrl property is a relative address, but there is no http base address. Either supply an http base address or set HttpGetUrl to an absolute address.

What am I overlooking here?

Was it helpful?

Solution

After further investigation it seems that it's not possible to have two endpoints with different SSL settings.

So if one endpoint of a service has SSL enabled, the other one needs it as well.

Unless someone else can proof that this is not correct, I have solved the issue by duplicating the service and thus creating two services. One has SSL enabled, the other one has it disabled.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top