Skip to main content
Version: v3

WebSite Element (Iis Extension)

IIs Web Site
Windows Installer references
Component, Fragment, Module, Product
Inner Text
Choice of elements (min: 0, max: unbounded)
IdStringIdentifier for the WebSite. Used within the MSI package only.Yes
AutoStartYesNoTypeSpecifies whether to automatically start the web site. 
ConfigureIfExistsYesNoTypeSpecifies whether to configure the web site if it already exists. Note: This will not affect uninstall behavior. If the web site exists on uninstall, it will be removed. 
ConnectionTimeoutNonNegativeIntegerSets the timeout value for connections in seconds. 
DescriptionStringThis is the name of the web site that will show up in the IIS management console.Yes
DirectoryStringRoot directory of the web site. Resolved to a directory in the Directory table at install time by the server custom actions. 
DirPropertiesString References the Id attribute for a WebDirProperties element that specifies the security and access properties for this website root directory. This attribute may not be specified if a WebDirProperties element is directly nested in this element.  
SequenceIntegerSequence that the web site is to be created in. 
SiteIdString Optional attribute to directly specify the site id of the WebSite. Use this to ensure all web sites in a web garden get the same site id. If a number is provided, the site id must be unique on all target machines. If "*" is used, the Description attribute will be hashed to create a unique value for the site id. This value must be a positive number or a "*" or a formatted value that resolves to "-1" (for the same behavior as "*") or a positive number or blank. If this attribute is absent then the web site will be located using the WebAddress element associated with the web site.  
StartOnInstallYesNoTypeSpecifies whether to start the web site on install. 
WebApplicationStringReference to a WebApplication that is to be installed as part of this web site. 
WebLogStringReference to WebLog definition. 
Nesting WebSite under a Component element will result in a WebSite being installed to the machine as the package is installed.
Nesting WebSite under Product, Fragment, or Module results in a web site "locator" record being created in the IIsWebSite table. This means that the web site itself is neither installed nor uninstalled by the MSI package. It does make the database available for referencing from a WebApplication, WebVirtualDir or WebDir record. This allows an MSI to install WebApplications, WebVirtualDirs or WebDirs to already existing web sites on the machine. The install will fail if the web site does not exist in these cases.
See Also
Iis Schema