This project has moved and is read-only. For the latest updates, please go here.

To create Application and VDIRs under it in IIS7.5

Topics: IIS and Web Services, Server Deployment
Aug 14, 2013 at 11:27 AM
I have many VDIRs that are clubbed into a application under IIS 7.5. How can I achieve the same automatically using BDTF?
 DefaultWeb Site
                 ABC Application
                                    VDIR 1
                                    VDIR 2
                                    VDIR 3
                                    VDIR 4
Currently I manually need to create the application in IIS, which then shows the VDIRs created by BTDF under it.
I tried creating the ABC Application the same way as VDIR. It did get created but it was not visisble in IIS. How is it possible to see them without adding the application?

Here's the sample config in BTDF file
                             <VDirList Include="*">
    <VDirList Include="*">
Aug 17, 2013 at 6:59 AM
I'd suggest that you just bypass the BTDF behavior and do it yourself. I'm assuming you are on BizTalk 2009 or newer.

You can download the MSBuild Extension Pack and add the necessary DLL's to an "ExternalDependencies" folder within your solution. Then in your .btdfproj, you can add one or more <UsingTask> elements to import the task(s) that you need to set up your IIS artifacts, using a relative path from the Deployment project folder to the DLL(s) in the ExternalDependencies folder.

You need to get those DLL's into your MSI, so add something like this to your .btdfproj:
  <Target Name="CustomRedist">
    <MakeDir Directories="$(RedistDir)\ExternalDependencies" />

    <!-- Force MSBuild to expand the item spec into physical file specs -->
    <CreateItem Include="..\ExternalDependencies\**\*.*">
      <Output TaskParameter="Include" ItemName="EDSourceGroup" />

    <Copy DestinationFolder="$(RedistDir)\ExternalDependencies\%(RecursiveDir)" SourceFiles="@(EDSourceGroup)"/>
The MSBuild Extension Pack tasks are now available for use within your .btdfproj. Check out their documentation to figure out how and what tasks to use.

Now add an override for the Deployment Framework's DeployVDirs target:
  <Target Name="DeployVDirs" Condition="'$(IncludeVirtualDirectories)' == 'true'">
      <!-- Use Extension Pack tasks here -->
Similarly you may want to override the UndeployVdirs target:
  <Target Name="UndeployVDirs" DependsOnTargets="SetWinVer;GetSoftwarePaths" Condition="'$(IncludeVirtualDirectories)' == 'true' and '$(SkipUndeploy)' == 'false' and '$(UndeployIISArtifacts)' == 'true'">
      <!-- Use Extension Pack tasks here -->
I haven't tested any of this but it should be close. Hopefully that's enough to get you on your way.