Configuring Windows Communication Foundation for HTTPS |
|||||
Configuring Windows Communication Foundation for HTTPS |
|
||
By default, Windows Communication Foundation (WCF) is not configured for HTTPS. Workflow designer, Process designer, and Chat module are dependent on WCF.
This topic describes how you can configure the necessary files to make WCF work under HTTPS.
If you want WCF to work under HTTPS, you need to add an HTTPS binding to IIS first. You can find more information on adding an HTTPS binding to your site in IIS on the following website:
http://technet.microsoft.com/en-us/library/cc731692(v=ws.10).aspx
Once you configure IIS, refer to the appropriate section of the topic based on which configurations you need to make:
•Configuring WCF to use Chat module under HTTPS only
•Configuring WCF to use Chat module under both HTTP and HTTPS
•Configuring WCF to use Process designer under HTTPS only
•Configuring WCF to use Process designer under both HTTP and HTTPS
•Configuring WCF to use Workflow designer under HTTPS only
•Configuring WCF to use Workflow designer under both HTTP and HTTPS
1. Open your project's web.config file.
2. Add a binding based on WebHttpBinding into the <system.serviceModel> - <bindings> section.
<webHttpBinding> <binding name="SecureHttpBinding"> <security mode="Transport" /> </binding> </webHttpBinding> |
3. Add the following HTTPS endpoint for the newly created binding into the <service name=CMS.Chat.ChatService> section.
<endpoint address="" behaviorConfiguration="ChatServiceBehavior" binding="webHttpBinding" bindingConfiguration="SecureHttpBinding" contract="CMS.Chat.IChatService" /> |
4. Remove the following HTTP endpoint from the <service name=CMS.Chat.ChatService> section.
<endpoint address="" behaviorConfiguration="ChatServiceBehavior" binding="webHttpBinding" cpntract="CMS.Chat.IChatService" /> |
5. Add the following HTTPS endpoint for the newly created binding into the <service name=CMS.Chat.ChatSupportService> section.
<endpoint address="" behaviorConfiguration="ChatServiceBehavior" binding="webHttpBinding" bindingConfiguration="SecureHttpBinding" contract="CMS.Chat.IChatSupportService" /> |
6. Remove the following HTTP endpoint from the <service name=CMS.Chat.ChatSupportService> section.
<endpoint address="" behaviorConfiguration="ChatServiceBehavior" binding="webHttpBinding" contract="CMS.Chat.IChatSupportService" /> |
7. Save the web.config file.
This is the resulting part of the web.config file where you just configured Chat for HTTPS:
<bindings> <basicHttpBinding> <!-- SalesForce BEGIN --> <binding name="SalesForceBinding" transferMode="Buffered"> <security mode="Transport"> <transport clientCredentialType="None" proxyCredentialType="None" realm="" /> <message clientCredentialType="UserName" algorithmSuite="Default" /> </security> </binding> <!-- SalesForce END --> </basicHttpBinding> <webHttpBinding> <binding name="SecureHttpBinding"> <security mode="Transport" /> </binding> </webHttpBinding> </bindings> <behaviors> <endpointBehaviors> <behavior name="ChatServiceBehavior"> <enableWebScript /> </behavior> </endpointBehaviors> </behaviors> <services> <service name="CMS.Chat.ChatService"> <endpoint address="" behaviorConfiguration="ChatServiceBehavior" binding="webHttpBinding" bindingConfiguration="SecureHttpBinding" contract="CMS.Chat.IChatService" /> </service> <service name="CMS.Chat.ChatSupportService"> <endpoint address="" behaviorConfiguration="ChatServiceBehavior" binding="webHttpBinding" bindingConfiguration="SecureHttpBinding" contract="CMS.Chat.IChatService" /> </service> </services> |
1. Open your project's web.config file.
2. Create a binding based on WebHttpBinding in the <system.serviceModel> - <bindings> section.
<webHttpBinding> <binding name="SecureHttpBinding"> <security mode="Transport" /> </binding> </webHttpBinding> |
3. Add both the HTTP and HTTPS endpoints into the <service name=CMS.Chat.ChatService> section. Note that the HTTP endpoint is present in the file by default.
<endpoint address="" behaviorConfiguration="ChatServiceBehavior" binding="webHttpBinding" bindingConfiguration="SecureHttpBinding" contract="CMS.Chat.IChatService" /> |
<endpoint address="" behaviorConfiguration="ChatServiceBehavior" binding="webHttpBinding" cpntract="CMS.Chat.IChatService" /> |
4. Add both HTTP and HTTPS endpoints into the <service name=CMS.Chat.ChatSupportService> section. Note that the HTTP endpoint is present in the file by default.
<endpoint address="" behaviorConfiguration="ChatServiceBehavior" binding="webHttpBinding" bindingConfiguration="SecureHttpBinding" contract="CMS.Chat.IChatSupportService" /> |
<endpoint address="" behaviorConfiguration="ChatServiceBehavior" binding="webHttpBinding" contract="CMS.Chat.IChatSupportService" /> |
5. Save the web.config file.
This is the resulting part of the web.config file where you just configured Chat for both HTTP and HTTPS:
<bindings> <basicHttpBinding> <!-- SalesForce BEGIN --> <binding name="SalesForceBinding" transferMode="Buffered"> <security mode="Transport"> <transport clientCredentialType="None" proxyCredentialType="None" realm="" /> <message clientCredentialType="UserName" algorithmSuite="Default" /> </security> </binding> <!-- SalesForce END --> </basicHttpBinding> <webHttpBinding> <binding name="SecureHttpBinding"> <security mode="Transport" /> </binding> </webHttpBinding> </bindings> <behaviors> <endpointBehaviors> <behavior name="ChatServiceBehavior"> <enableWebScript /> </behavior> </endpointBehaviors> </behaviors> <services> <service name="CMS.Chat.ChatService"> <endpoint address="" behaviorConfiguration="ChatServiceBehavior" binding="webHttpBinding" bindingConfiguration="SecureHttpBinding" contract="CMS.Chat.IChatService" /> <endpoint address="" behaviorConfiguration="ChatServiceBehavior" binding="webHttpBinding" contract="CMS.Chat.IChatService" /> </service> <service name="CMS.Chat.ChatSupportService"> <endpoint address="" behaviorConfiguration="ChatServiceBehavior" binding="webHttpBinding" bindingConfiguration="SecureHttpBinding" contract="CMS.Chat.IChatService" /> <endpoint address="" behaviorConfiguration="ChatServiceBehavior" binding="webHttpBinding" contract="CMS.Chat.IChatSupportService" /> </service> </services> |
1. Open the Automation web.config file located in ~/CMSModules/Automation.
2. Create a binding based on WebHttpBinding in the <system.serviceModel> - <bindings> section.
<webHttpBinding> <binding name="SecureHttpBinding"> <security mode="Transport" /> </binding> </webHttpBinding> |
3. Add an HTTPS endpoint for the newly created binding into the <service name="CMS.WebServices.AutomationDesignerService"> section.
<endpoint address="" behaviorConfiguration="AutomationDesignerServiceBehavior" binding="webHttpBinding" bindingConfiguration="SecureHttpBinding" contract="CMS.WebServices.IWorkflowDesignerService" /> |
4. Remove the HTTP endpoint from the <service name="CMS.WebServices.AutomationDesignerService"> section.
<endpoint address="" behaviorConfiguration="AutomationDesignerServiceBehavior" binding="webHttpBinding" contract="CMS.WebServices.IWorkflowDesignerService" /> |
5. Save the web.config file.
This is the resulting web.config file where you just configured Process designer and Workflow designer for HTTPS:
<?xml version="1.0"?> <configuration> <system.serviceModel> <bindings> <webHttpBinding> <binding name="SecureHttpBinding"> <security mode="Transport" /> </binding> </webHttpBinding> </bindings> <behaviors> <endpointBehaviors> <behavior name="AutomationDesignerServiceBehavior"> <enableWebScript /> </behavior> </endpointBehaviors> </behaviors> <services> <service name="CMS.WebServices.AutomationDesignerService"> <endpoint address="" behaviorConfiguration="AutomationDesignerServiceBehavior" binding="webHttpBinding" bindingConfiguration="SecureHttpBinding" contract="CMS.WebServices.IWorkflowDesignerService" /> </service> </services> </system.serviceModel> <system.web> <authorization> <deny users="?"/> </authorization> </system.web> <location path="Services/AutomationDesignerService.svc"> <system.web> <authorization> <deny users="?"/> </authorization> </system.web> </location> </configuration> |
1. Open the Automation web.config file located in ~/CMSModules/Automation.
2. Create a binding based on WebHttpBinding in the <system.serviceModel> - <bindings> section.
<webHttpBinding> <binding name="SecureHttpBinding"> <security mode="Transport" /> </binding> </webHttpBinding> |
3. Add both HTTP and HTTPS endpoints into the <service name="CMS.WebServices.AutomationDesignerService"> section. Note that the HTTP endpoint is present in the file by default.
<endpoint address="" behaviorConfiguration="AutomationDesignerServiceBehavior" binding="webHttpBinding" bindingConfiguration="SecureHttpBinding" contract="CMS.WebServices.IWorkflowDesignerService" /> |
<endpoint address="" behaviorConfiguration="AutomationDesignerServiceBehavior" binding="webHttpBinding" contract="CMS.WebServices.IWorkflowDesignerService" /> |
4. Save the web.config file.
This is the resulting web.config file where you just configured Process designer and Workflow designer for both HTTP and HTTPS:
<?xml version="1.0"?> <configuration> <system.serviceModel> <bindings> <webHttpBinding> <binding name="SecureHttpBinding"> <security mode="Transport" /> </binding> </webHttpBinding> </bindings> <behaviors> <endpointBehaviors> <behavior name="AutomationDesignerServiceBehavior"> <enableWebScript /> </behavior> </endpointBehaviors> </behaviors> <services> <service name="CMS.WebServices.AutomationDesignerService"> <endpoint address="" behaviorConfiguration="AutomationDesignerServiceBehavior" binding="webHttpBinding" contract="CMS.WebServices.IWorkflowDesignerService" /> <endpoint address="" behaviorConfiguration="AutomationDesignerServiceBehavior" binding="webHttpBinding" bindingConfiguration="SecureHttpBinding" contract="CMS.WebServices.IWorkflowDesignerService" /> </service> </services> </system.serviceModel> <system.web> <authorization> <deny users="?"/> </authorization> </system.web> <location path="Services/AutomationDesignerService.svc"> <system.web> <authorization> <deny users="?"/> </authorization> </system.web> </location> </configuration> |
1. Open the Automation web.config file located in ~/CMSModules/Workflows.
2. Create a binding based on WebHttpBinding in the <system.serviceModel> - <bindings> section.
<webHttpBinding> <binding name="SecureHttpBinding"> <security mode="Transport" /> </binding> </webHttpBinding> |
3. Add an HTTPS endpoint for the newly created binding into the <service name="CMS.WebServices.AutomationDesignerService"> section.
<endpoint address="" behaviorConfiguration="WorkflowDesignerServiceBehavior" binding="webHttpBinding" bindingConfiguration="SecureHttpBinding" contract="CMS.WebServices.IWorkflowDesignerService" /> |
4. Remove the HTTP endpoint from the <service name="CMS.WebServices.AutomationDesignerService"> section.
<endpoint address="" behaviorConfiguration="WorkflowDesignerServiceBehavior" binding="webHttpBinding" contract="CMS.WebServices.IWorkflowDesignerService" /> |
5. Save the web.config file.
This is the resulting web.config file where you just configured Process designer and Workflow designer for HTTPS:
<?xml version="1.0"?> <configuration> <system.serviceModel> <bindings> <webHttpBinding> <binding name="SecureHttpBinding"> <security mode="Transport" /> </binding> </webHttpBinding> </bindings> <behaviors> <endpointBehaviors> <behavior name="WorkflowDesignerServiceBehavior"> <enableWebScript /> </behavior> </endpointBehaviors> </behaviors> <services> <service name="CMS.WebServices.WorkflowDesignerService"> <endpoint address="" behaviorConfiguration="WorkflowDesignerServiceBehavior" binding="webHttpBinding" bindingConfiguration="SecureHttpBinding" contract="CMS.WebServices.IWorkflowDesignerService" /> </service> </services> </system.serviceModel> <system.web> <authorization> <deny users="?"/> </authorization> </system.web> <location path="Services/WorkflowDesignerService.svc"> <system.web> <authorization> <deny users="?"/> </authorization> </system.web> </location> </configuration> |
1. Open the Automation web.config file located in ~/CMSModules/Workflows.
2. Create a binding based on WebHttpBinding in the <system.serviceModel> - <bindings> section.
<webHttpBinding> <binding name="SecureHttpBinding"> <security mode="Transport" /> </binding> </webHttpBinding> |
3. Add both HTTP and HTTPS endpoints into the <service name="CMS.WebServices.AutomationDesignerService"> section. Note that the HTTP endpoint is present in the file by default.
<endpoint address="" behaviorConfiguration="WorkflowDesignerServiceBehavior" binding="webHttpBinding" bindingConfiguration="SecureHttpBinding" contract="CMS.WebServices.IWorkflowDesignerService" /> |
<endpoint address="" behaviorConfiguration="WorkflowDesignerServiceBehavior" binding="webHttpBinding" contract="CMS.WebServices.IWorkflowDesignerService" /> |
4. Save the web.config file.
This is the resulting web.config file where you just configured Process designer and Workflow designer for both HTTP and HTTPS:
<?xml version="1.0"?> <configuration> <system.serviceModel> <bindings> <webHttpBinding> <binding name="SecureHttpBinding"> <security mode="Transport" /> </binding> </webHttpBinding> </bindings> <behaviors> <endpointBehaviors> <behavior name="WorkflowDesignerServiceBehavior"> <enableWebScript /> </behavior> </endpointBehaviors> </behaviors> <services> <service name="CMS.WebServices.WorkflowDesignerService"> <endpoint address="" behaviorConfiguration="WorkflowDesignerServiceBehavior" binding="webHttpBinding" contract="CMS.WebServices.IWorkflowDesignerService" /> <endpoint address="" behaviorConfiguration="WorkflowDesignerServiceBehavior" binding="webHttpBinding" bindingConfiguration="SecureHttpBinding" contract="CMS.WebServices.IWorkflowDesignerService" /> </service> </services> </system.serviceModel> <system.web> <authorization> <deny users="?"/> </authorization> </system.web> <location path="Services/WorkflowDesignerService.svc"> <system.web> <authorization> <deny users="?"/> </authorization> </system.web> </location> </configuration> |