Deploy an IIS Site with BTDF

Tanguy Schoubert
Published by Tanguy
Category : BizTalk / DevOps

To expose a web service with Biztalk, the Biztalk WCF Service Publishing Wizard can be used. This wizard, among other things, generates an IIS site. In order to fully automatize the deployment, it can be useful to include this IIS site and its configuration in a BTDF deployment project.

For that purpose, first of all you have to add the IIS site to your Visual Studio project, in a solution folder named WebServices for example. To find the elements to add you just have to right click in IIS on your site, then click Explore. Here are the elements that should have been added in Visual Studio:

BTDF add iis site

A small modification is necessary in the Web.config file. Right after the tag <system.serviceModel> you have to add:


<serviceHostingEnvironment multipleSiteBindingsEnabled="true"/>

As an example, here is my configuration <system.webServer> (I use a basic authentication):

       <anonymousAuthentication enabled="false" />
       <basicAuthentication enabled="true" />
       <windowsAuthentication enabled="false" />
       <remove users="*" roles="" verbs="" />

Then you have to edit your .btdfproj file by adding the following lines and specifying the AppPool you wish to use:

<VDirList Include="*">

To change the AppPool from Classic to Integrated, the following line is necessary:

<Exec Command=""C:\Windows\System32\inetsrv\appcmd.exe" set APPPOOL
 /"MyAppPool" /managedRuntimeVersion:v4.0 /managedPipelineMode:Integrated" />

Finally, the following tag must be added:

<Exec Command=""C:\Windows\system32\inetsrv\appcmd.exe" 
set config "Default Web Site/MySite" -section:Access -sslFlags:Ssl,Ssl128 -commit:APPHOST" />

The sslFlags option allows us to specify the Require SSL option which is in the SSL Settings:

BTDF BizTalk IIS SSL Settings

That’s it, your BTDF now embeds the deployment of both your IIS site and the configuration of its AppPool. At this point, Your BizTalk bindings remain to be construct, if they’re not yet