Wednesday, October 6, 2010

BizTalk WCF Web Service Over SSL

1 . Expose a BizTalk WCF Web Service using BizTalk WCF Service Publishing
Wizard tool.
It creates one WCF web service in IIS and another one is Receive Location in BizTalk.
2 . Changes required in Web.Config of WCF Web Service.
Go to the web.config file by navigating from WCF Web Service in IIS.
a . Configure BizTalk Receive Location

receiveLocationName="WcfService_BizTalkAccountDataWcfService/AcountDataService"
publicBaseAddress=https://<>:9090/ />

b . HttpsGetEnable should be true

c . Enable HttpsMexendpoint
binding="mexHttpsBinding" bindingConfiguration=""
contract="IMetadataExchange" />
3 . Changes required in BizTalk ReceiveLocation configuration.
Go to the Biztalk ReceiveLocation that will be created by Wizard in first step.
Click on the configuration button (here transport type may be WCF-BasicHttp or
WCF- WSHttp).Next Click on Security tab of Transport Property, then change the below
configuration.
Security Mode: Transport
Transport clint credential type : None
4. Changes required in IIS
a . Set the Application Pool for the WCF Web Service.
Select your WCF Web Service from IIS and click on Advanced Settings from
Action pane. Create a new application pool and select here, otherwise you can give
BAMAppPool temporarly.
ApplicationPool – BAMAppPool (example)
b . Create a Self signed Certificate
i. Go to IIS and click on the Top node then Click on the Server Certificates from
central panel.
ii. Click on the Create a Self Signed Certificate from Action panel.
iii. Enter the name and click ok.
c . Add https with port and certificate.
i. Select Default Web Sites in IIS then click on bindings option from Actions panel
(it will be right panel of the IIS).
ii. Click on the Add button on Site Bindings pop up.
iii. Select following setting on Add site bindings.
Type: Https
Port: 9090 (Use the same port what you used in web.config – look at the2.a
section above)
SSL Certificate: Select a certificate you created in 4.a section above.
d . Enable SSL for you WCF web Service.
i. Click on your WCF Web Service inside IIS.
ii. Then Click on SSL Settings from central panel. Next Check the SSL
Required checkbox and Select the Accept radio button for Clint Certificates.
5. Restart the IIS using IISReset command and enable the BizTalk ReceiveLocation then try
to browse the URL. It will show the WSDL file without error.
Reference URL - http://rocksolidknowledge.com/Screencasts.mvc/Watch?video=WCFSSL.wmv

No comments: