Error with service endpoint in wcf https ssl. Cannot find a base address that matches the http scheme for the endpoint with WebHttpBinding

I have the following code on my server

<services> <service name="ME.Streets.WebGateway.DuplexService.DuplexService" behaviorConfiguration="sb"> .... <endpoint address="" binding="webHttpBinding" behaviorConfiguration="webHttpEndpointBehavior" contract="ME.Streets.WebGateway.DuplexService.Interface.IPolicyRetriever"/> .... <host> <baseAddresses> <add baseAddress="https://localhost:10201" /> </baseAddresses> </host> </service> 

I switched the silverlight application to HTTPS using SSL and WCF, but if I started my server I got the following error

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

I am very unsure where this error came from. Do I need to install https <baseaddress> node in a <service> node?

+4
source share
1 answer

Fixed!

Changed the endpoint to this (added bindingConfiguration = "webHttpsBinding"):

 <services> ..... <endpoint address="" binding="webHttpBinding" behaviorConfiguration="webHttpEndpointBehavior" bindingConfiguration="webHttpsBinding" contract="ME.Streets.WebGateway.DuplexService.Interface.IPolicyRetriever"> </endpoint> ...... </services> 

And the new binding configuration is as follows:

 <bindings>.... <webHttpBinding> <binding name="webHttpsBinding"> <security mode="Transport"> <transport clientCredentialType="None" /> </security> </binding> </webHttpBinding> ...... </bindings> 

This gives the endpoint a binding to the http binding, which indicates what the information was supposed to carry, and the type of credentials that are associated with users should have

+3
source

Source: https://habr.com/ru/post/1446293/


All Articles