Adding a website to IIS that runs under your app pool
Adding a website to IIS lets us serve content, such as HTML pages, to users when they navigate to a certain URL in their browsers. In this recipe, we'll add a website that contains a Default.htm
page. IIS looks for a page with this name to display first. Our website will run in a new application pool.
Getting ready
Perform the following steps to prepare for this recipe:
Create a new setup project and name it
WebsiteInstaller
.Add
IIsExtension
to the project by right-clicking on the References node in Solution Explorer and going to Add Reference... | WixIIsExtension.dll | Add | OK.Add the
IIsExtension
namespace to theWix
element:<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi" xmlns:iis="http://schemas.microsoft.com/wix/IIsExtension">
Add an application pool, as we did in the previous recipe, so that we can later assign our website to it. Set its
Id
attribute toMyAppPool
.Add an HTML file to the project so that we'll have a page...