i have the following code in 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 have been switching the silverlight application over to HTTPS with SSL and WCF, but if i run my server, i recieved 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 highly unsure of where this error is coming from. Do i have to install a https <baseaddress>
node within the <service>
node?
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 end point a binding to a http binding that specifies which was to transport the information and the type of credentials that connected users must have
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.