0

I have SSL working for my SOAP endpoint.

But as soon as I enable my REST endpoint, it throws a fit:

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

My app.config:

 <system.serviceModel> <bindings> <basicHttpBinding> <binding name="IIncreasedBufferSize" maxBufferSize="1024000" maxReceivedMessageSize="1024000"> <readerQuotas maxArrayLength="1024000" /> <security mode ="Transport"> <transport clientCredentialType= "None" /> </security> </binding> </basicHttpBinding> </bindings> <services> <service behaviorConfiguration="WCFBehaviourSSL" name="IWCF.IService"> <endpoint name="soap" address="soap" binding="basicHttpBinding" bindingConfiguration="IIncreasedBufferSize" contract="IWCF.IServices"> <identity> <dns value="localhost" /> </identity> </endpoint> <endpoint name="rest" address="rest" binding="webHttpBinding" contract="IWCF.IServices" behaviorConfiguration="REST" /> <host> <baseAddresses> <add baseAddress="http://localhost:8732/Design_Time_Addresses/WcfServiceLibrary2/Service1/" /> </baseAddresses> </host> </service> </services> <behaviors> <endpointBehaviors> <behavior name="REST"> <webHttp/> </behavior> </endpointBehaviors> <serviceBehaviors> <behavior name="WCFBehaviourSSL"> <serviceMetadata httpGetEnabled="False" httpsGetEnabled="True"/> <serviceDebug includeExceptionDetailInFaults="True" /> </behavior> </serviceBehaviors> </behaviors> </system.serviceModel> 

I found this question: REST WCF Service Over SSL But rest assured, None of the answers provided are of use.

I have certificates, and it does work with SSL using the SOAP end point. (when rest endpoint is commented out).

1 Answer 1

5

I was missing a WebHTTPBinding, that uses Transport security:

 <webHttpBinding> <binding name ="REST SSL"> <security mode ="Transport"> <transport clientCredentialType= "None" /> </security> </binding> </webHttpBinding> 

. . .

 <endpoint name="rest" address="rest" binding="webHttpBinding" contract="IWCF.IServices" behaviorConfiguration="REST" bindingConfiguration="REST SSL"/> 
Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.