Create Web Site Action



Use the IIS Create Web Site action to create a new web site. The Create Web Site action also creates a root virtual directory.




Select the server (and connection credentials) under the Server tab (see the Server Selection topic for details.)


New Web Site Details


Description - Description specifies a ServerComment property for the web site (in other words its name.) Web sites are identified either by this property or their index number.


Fail if a web site... - If this option is checked, the action will fail if another web site already has this description.


Delete and overwrite... - If this option is checked, a web site with this name will be overwritten and replaced with the new site. The new web site will have the same index number as the old site.


If neither Fail nor Delete is selected, a new web site will be created even if it has the same description as a pre-existing one.



Root Directory - Specify a directory local to the server on which to create the root virtual directory. Set the permissions for this directory on the Permissions tab.



Start new web site after creating it - If this option is checked, the new web site will be switched to the Running state after creation.


Note that even if this fails (most likely because another running web site is bound to the same host/server/port), the new web site is still created (in the Stopped state), but the action will fail.


For fine-grained control over failure (ie for use in Try...Catch blocks), use a separate Start Web Site action.



Server Bindings


You can specify a specific IP, hostname, or Port combination to bind the new server to. Leave values blank to match all-inclusive wild cards.


Note that if any of these values overlap with an existing web site, the two cannot be run concurrently.



Permissions Tab


Set the permissions for the new web site's root Virtual Directory.