Enable WCF services for HTTPS Protocol


Once we had a service built on WCF framework in HTTP protocol, later on when client’s web based application is available on HTTPS after inclusion of SSL certificate, this service results in mixed mode computability issue for users. However this issue was resolved by defining a separate end point in webconfig file for HTTPS protocol.

<service name=”Service.eService” behaviorConfiguration=”DefaultServiceBehavior”>
<endpoint binding=”webHttpBinding” contract=”Service.IService”                          behaviorConfiguration=”DefaultEPBehavior” bindingConfiguration=”HTTPsBinding” />
<behavior name=”DefaultEPBehavior”>
<behavior name=”DefaultServiceBehavior”>
<serviceMetadata httpGetEnabled=”true”/>
<serviceDebug includeExceptionDetailInFaults=”true”/>
<binding name=”HTTPsBinding”>
<security mode=”Transport”>
<add name=”CorsSupport” type=”Service.CorsSupportBehaviorElement, App_Code”/>
<serviceHostingEnvironment multipleSiteBindingsEnabled=”true”/>


Note: Key thing to mention here is to define a new endpoint for HTTPS domain in web config of WCF project, bindingConfiguration=”HTTPsBinding” this will do the magic !!!


One thought on “Enable WCF services for HTTPS Protocol

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s