Use the BeginAllocateWebSite procedure of the IIS Resource Manager namespace to allocate initial resources for a Web site. This is the primary procedure callers use to allocate resources for creating each new Web site.
This procedure runs as the Microsoft Provisioning Framework service account for calls to the Resource Manager database, and it impersonates the caller when creating directories and when creating and setting Web and FTP site permissions.
<request>
<procedure>
<execute namespace="IIS Resource Manager" procedure="BeginAllocateWebSite">
<executeData>
<diskMegabytes>30000</diskMegabytes>
<hostHeaderName>www.contosoHostHeader.com</hostHeaderName>
</executeData>
<after source="executeData" destination="data" destinationPath="BeginAlloc" mode="merge" />
</execute>
</procedure>
</request>
The following input is valid for this request:
In the <diskMegabytes> tag, you must specify the disk space (in megabytes) allocated to the Web site.
<diskMegabytes>allocated disk space</diskMegabytes>
In the <hostHeaderName> tag, you can specify the host header name for the site. If the site does not use a host header name, this parameter should be omitted. This will cause an IP address to be returned but not allocated to the Web site. If this parameter is included, the IP address will be returned and allocated to the Web site. The IP address might be allocated to zero or one Web site that has no Host Header, but it might be returned without allocation to any number of host header sites.
<hostHeaderName>host header name of site</hostHeaderName>
Optionally, you can supply an empty <isFTP/> tag. If you do supply this tag, an IP address with an available FTP port will be allocated; if an <isFTP/> tag is not present, the request is for a non-FTP port.
<isFTP/>
Note
This procedure returns the computer name where allocation was made and where the Web or FTP site should be created. The response also contains the root physical directory path (not UNC path) that should be used when creating a physical directory for the Web or FTP site.
Note
<response>
<data>
<BeginAlloc>
<diskMegabytes>30000</diskMegabytes>
<hostHeaderName>www.contoso.com</hostHeaderName>
<IPAddress>157.60.0.1</IPAddress>
<Server>computer03</Server>
<Root>d:\computer03</Root>
</BeginAlloc>
</data>
</response>
Important