In my earlier article I discussed Exposing WCF REST Service over HTTPS. A major limitation of the service created in that article was it's self-hosted nature. In this article, I will continue with that service and host it in IIS. So at the end of this article, you will be able to host a WCF REST Service in IIS with HTTPS. Configure IIS To start with let us first configure a Web Site in IIS.Open IIS
<?xml version="1.0"?><configuration> <system.web> <compilation debug="true" targetFramework="4.0" /> </system.web> <system.serviceModel> <behaviors> <serviceBehaviors> <behavior name="svcBehavior"> <serviceMetadata httpGetEnabled="true"/> <serviceDebug includeExceptionDetailInFaults="false"/> </behavior> </serviceBehaviors> </behaviors> <bindings> <webHttpBinding> <binding> <security mode="Transport"/> </binding> </webHttpBinding> </bindings> <services> <service name="WcfService13.IService1" behaviorConfiguration="svcBehavior"> <endpoint name="" binding="webHttpBinding" address="" contract="WcfService13.IService1" /> </service> </services> <serviceHostingEnvironment multipleSiteBindingsEnabled="true" /> </system.serviceModel> <system.webServer> <modules runAllManagedModulesForAllRequests="true"/> </system.webServer> </configuration>Publish Service
Right-click on WCF Service and click on Publish
Choose Web Deploy
At Site URL give any URL of your choice
In Site Application give the name of the site you created in the beginning of this article.
In this article we saw how to host WCF REST Service in IIS with HTTPS. Thanks for reading. I hope it was useful.
You need to be a premium member to use this feature. To access it, you'll have to upgrade your membership.
Become a sharper developer and jumpstart your career.
$0
$
. 00
monthly
For Basic members:
$20
For Premium members:
$45
For Elite members: