Deploying IIS websites
Published 07 August 2013
If you are deploying an ASP.NET web application, Deployment Manager configures IIS for you.
Deployment Manager can configure IIS 6, 7 and 7.5.
Deployment Manager only supports basic IIS configuration. If your deployment needs to be more complicated (for example, creating websites on the fly), you will need to use the PowerShell script support in conjunction with the Windows IIS 7 PowerShell modules.
Worked example
For a step-by-step guide to deploying a web application, see Worked example - deploying a web application.
Changing the home directory
If your NuGet package contains a web.config file, Deployment Manager will assume it is a website, and will attempt to configure IIS for you.
For example, before deployment, your IIS site might have pointed to:
C:\Apps\Production\Acme.WebStore\1.0.0
After extracting and deploying version 2.0 of the package, the site's Home Directory will point to:
C:\Apps\Production\Acme.WebStore\2.0.0
This change will cause IIS to start serving requests from the new location. If there is a problem, you can manually revert the IIS website to point to the old package, or re-deploy the old release with Deployment Manager.
Variables
If you want Deployment Manager to create a new IIS website, you need to specify the following variables:
- RedGateWebSiteName
The IIS site name or virtual directory to use when creating the IIS website. - RedGateCreateWebSiteOnPort
The port number to use when creating the IIS website.
You also need to specify the following to create a new application pool:
- RedGateCreateWebSiteApplicationPool
The name of the application pool to create. - RedGateCreateWebSiteDotNetVersion
The .NET Framework version to use for the application pool. - RedGateCreateWebSiteIdentityType
The identity type to use for the application pool.
You can only use the application pool variables with IIS 7.
For example, if we want to create a new IIS website named WidgetShop, we specify the following:
Name | Value |
---|---|
RedGateWebSiteName | WidgetShop |
RedGateCreateWebSiteOnPort | 8080 |
RedGateCreateWebSiteApplicationPool | WidgetShop |
RedGateCreateWebSiteDotNetVersion | v4.0 |
RedGateCreateWebSiteIdentityType | ApplicationPoolIdentity |
For more information, see IIS website variables.