Expose WCF service through HTTPS for SOAP and REST
In this article we come to know, how to expose REST and SOAP WCF service over HTTPS. We also
come to know different SSL related settings in IIS.
To learn how to expose
website or WCF Service over https and also how to use secure socket layer.Explanation
To expose service over
HTTPS you have do the following:-
Web.config file changes
1. In serviceMetaData change httpGetEnabled=
true to httpsGetEnabled= true.
mexHttpBinding as mexHttpsBinding
3. Set Binding for REST and
4. Set bindingConfiguration properties in
1. Create Server
section select root node than double click on server certificate.
In right pane click on “Create
Self-Singed Certificate”. Give certificate name and click on OK. One
certificate is created.
2. Set certificate
Click on your web
site and select bindings from right pane.
Click on Add and
select type as “https” and select the SSL Certificate that you created.
Click on OK.
3. Now select SSL Settings of
the web site. Check on “Require SSL”. From right pane click on Apply.
Restart you web
Your web site is
ready to use over HTTPS.
So, in this article we have
learned to expose WCF service over HTTPS we have to do some setting changes in
web.config as well as in IIS. Hope this
will help you.