Use the CreateWebSite procedure of the Managed IIS namespace to create a Web site.
This procedure expects to be called with impersonate="1". The procedure impersonates the caller.
<request>
<procedure>
<execute namespace="Managed IIS" procedure="CreateWebSite">
<executeData>
<description>www.ContosoHostHeaderWebSite.com</description>
<diskMegabytes>40</diskMegabytes>
<hostHeaderName>www.ContosoHostHeaderWebSite.com</hostHeaderName>
<owner>LDAP://ou=Reseller,ou=Hosting,dc=contoso,dc=com</owner>
<policyName>reseller</policyName>
<StartOnCreate>1</StartOnCreate>
<preferredDomainController>myPrimaryDC.contoso.com </preferredDomainController>
</executeData>
<after source="executeData" sourcePath="IISPath" destination="data" />
</execute>
</procedure>
</request>
The following input is valid for this request:
In the <StartOnCreate> element, specify whether the Web site starts automatically when it is created. To start the Web site when it is created, specify 1. The default value is 0, to not start the Web site when it is created.
<StartOnCreate>0|1>/StartOnCreate>
In the <owner> element, specify the Lightweight Directory Access Path (LDAP) of the organization to which this Web site belongs. The organization must correspond to the Creation Policy as follows:
<owner>organization in which the Web site is being created.</owner>
In the <diskMegabytes> element, specify the amount of disk space, in megabytes, that you want to reserve for this Web site.
<diskMegabytes>reserved disk space in megabytes</diskMegabytes>
By using the <description> element, you can specify a description of the Web site.
This information is optional.
<description>description of the Web site</description>
By using the <hostHeaderName> element, you can specify the host header name.
Any value entered must be a resolvable Domain Name System (DNS) name. If you enter a value, the Web site can share an Internet Protocol (IP) address and port with the other Web sites. If you do not enter a value, the Web site will be on port 80 with an IP address allocated by the Resource Manager.
This information is optional.
<hostHeaderName>host header name</hostHeaderName>
By using the <policyName> element, you can specify the type of organization in which the Web site belongs. To specify the organization type, use lowercase letters.
This information is optional. If you do not include it, the request uses the default value.
<policyName>default|hosting|reseller|customer</policyName>
By using the <preferredDomainController> element, you can specify the domain controller you want to use for this request. Using a single preferred domain controller eliminates replication delays that arise between multiple controllers.
This information is optional.
<preferredDomainController>yourPrimaryDomainController.YourHostname.DomainNameExtension</preferredDomainController>
The procedure returns the Internet Information Services (IIS) path of the new Web site in the <IISPath> element. A typical response is shown in this example.
<response>
<data>
<IISPath>IIS://MyServer/W3SVC/5</IISPath>
</data>
</response>
Important