How to make wcf to work over https. I want to use this wcf over https i have searched many articles i didn't get the answer please help iam new to wcf concepts. I want to call it from ajax,jquery
<system.serviceModel >
<services>
<service
name="WcfRestfulService.HttpService" behaviorConfiguration="ServiceBehaviour" >
<endpoint address="" binding="webHttpBinding" behaviorConfiguration="web"
contract="WcfRestfulService.IHttpService">
</endpoint>
</service>
</services>
<behaviors>
<serviceBehaviors>
<behavior name="ServiceBehaviour">
<!-- To avoid disclosing metadata information, set the value below to false and remove the metadata endpoint above before deployment -->
<serviceMetadata httpsGetEnabled="true"/>
<!-- To receive exception details in faults for debugging purposes, set the value below to true. Set to false before deployment to avoid disclosing exception information -->
<serviceDebug includeExceptionDetailInFaults="false"/>
</behavior>
</serviceBehaviors>
<endpointBehaviors>
<behavior name="web">
<webHttp/>
</behavior>
</endpointBehaviors>
</behaviors>
<serviceHostingEnvironment multipleSiteBindingsEnabled="true"/>
You need to set
security mode="Transport"
in the bindingRead more on MSDN
It appears you are building a RESTful Service with WCF and you are really close to securing it.
Here is what you need to do to secure it:
WebHttpBinding
configuration that has security mode set toTransport
.WebHttpBinding
configuration to the your Service Endpoint binding.httpGetEnabled="false"
.These changes are all summed up below in the revised configuration file (see comments for points that changed). Also note that your Service Endpoint must be using the HTTPS scheme and not HTTP.
I had the same problem, but wanted to test HTTP get requests, as my services are internal.
Remember to also make the HTTPS Get Enabled.
httpsGetEnabled="true"
My config is below as an example: