Windows-based Hosting::ModifyCustomerWebSite

The ModifyCustomerWebSite procedure modifies an existing hosted Web site.

Arguments

The ModifyCustomerWebSite procedure has the following input parameters.

Input Argument Description

<org>

The Lightweight Directory Access Protocol (LDAP) path of the owning organization.

<webSiteName> or <location>

The unique web site name that was established when the site was created or the IIS metabase path.

<preferredDomainController>

The name of the preferred domain controller.

<frontpageExtendWeb>

Allowed values are "1", which will install Frontpage extensions, or "0" which won't install the extensions. If "1" is specified and extensions are already installed an exception will be thrown. If "0" is specified and extensions are not installed, an exception will be thrown.

<anonymousUserPass>

The password for the automatically generated anonymous user. If supplied, the user's password will be reset and the new password will be applied to the AnonymousUserPass property of the IIS Site.

<uncUserPass>

If you provide this element, a user is created (if one does not already exist) and is set with this password. The resulting user is then applied to the UncUserName property for the web site.

<serverBindings>

The container for one or more instances of a <binding> element.

<serverBindings mode="[replace|clear|edit]">

The mode attribute which indicates the behavior that will occur with regard to existing bindings. If not supplied, a default mode of "edit" is assumed. Values are:

  • replace - any existing bindings are cleared from the site and the binding(s) included in the <binding> element are applied.

  • clear - all bindings are cleared from the site. Any <binding> elements passed in the request are ignored.

  • edit - supplied bindings are merged with existing bindings. When supplied, this mode indicates that the <binding> elements should either be "appended" to or "deleted" from the existing list of bindings. A mode element is included with each <binding> element to indicate the desired behavior.

<serverBindings>/<binding>

One or more instances with attributes containing the components of Web site server bindings. The number of bindings will be counted against (and cannot exceed) the number of Web sites (maxWebSites) in the Resource Manager.

  • @ipAddress - Can be omitted or included as zero-length to represent "all unassigned."

  • @hostHeader - Can be omitted or included as zero-length.

  • @port - A required parameter if using the <serverBindings>/<binding> node.

  • @mode - Specifies whether the binding should be appended to the current site bindings or deleted from the bindings. Ignored unless <serverBindings mode="edit" >. Allowed values are "append" and "delete." For bindings with a mode of "delete," the procedure will not fail if the binding does not exist. For bindings with a mode of "append" where the supplied binding matches an existing binding, the existing binding is preserved. If not supplied a default mode of "append" is assumed.

<properties>

The collection of the customer's root Web properties. Any valid property setting supported by the IIS provider can be passed. Typical optional properties include:

  • AuthFlags - An integer value. See IIS documentation for legal values.

  • AppFriendlyName - A string value. Defaults to "Default Application".

  • AppIsolated - An integer value. Uses IIS default.

  • AppPoolId - A string value for IIS 6.0 only.

  • @create - Set to "1" to create the App Pool if it does not exist. Default is "0."

  • Path - Sets the local path of the Web site root.

  • AuthFlags - Authorization flags for the IIS server.

  • DefaultLogonDomain - Sets the default login domain.

<keys>

The "keys" node specifies any child keys for which properties should be set. The <keys/> node can be omitted, or it can be empty. This "keys" node applies to any IIS paths beneath the root web of the site to be modified, such as a virtual directory (e.g. IIS://WEB01/w3svc/10/Root/images). See the IIS Provider::SetProperties documentation for more information on this node.

<megabytes>

The size to be allocated to the resource.

Output Arguments

The ModifyCustomerWebSite procedure has no return values.

Remarks

Security

The ModifyCustomerWebSite procedure has the following security requirements:

  • The caller is impersonated.

  • The caller is tested for OrgCreator permissions..

Procedure names are bold also (except in headings and titles). The descriptor "procedure" is not. Example: the EnableOrganization procedure

Please DO NOT add headers or deviate from the header order below. If there is a header level you would like to use that is not covered by a header below, please discuss with the owner of this template. If one of the following headings doesn't apply to this particular method or procedure, delete it (in many cases, you will only need half of the headings below).

Process Steps

The following steps occur when modifying customer Web sites with the ModifyCustomerWebSite procedure of the Managed Windows-based Hosting Namespace:

  1. Validate against plan settings and resource allocation as appropriate.

  2. Modify the customer's Web site calling Managed Web Hosting::ModifyCustomerWebSite.

  3. Install or remove FrontPage extensions if specified.

  4. Set the anonymous user account password if specified.

  5. Add or remove server bindings if specified.

  6. Ensure the existence of an application pool if specified in the property collection.

  7. Set properties in the property collection.

  8. Allocate resources from the resource pool.

  9. Update Resource Manager allocations.

Sample Code

Example XML Request

The following is an example of an XML request for the ModifyCustomerWebSite procedure of the Managed Windows-based Hosting Namespace:

<request> 
        <procedure> 
                <execute namespace="Windows-based Hosting"  
                procedure="ModifyCustomerWebSite" impersonate="1"> 
                        <executeData> 
                                <preferredDomainController>AD01.fabrikam.com 
                                </preferredDomainController> 
                                <org>LDAP://OU=northwindtraders,OU=consolidatedmessenger, 
                                OU=Hosting,DC=fabrikam,DC=Com</org> 
                                <webSiteName>NorthWindWeb</webSiteName> 
                                <anonymousUserPass>Pass1Word</anonymousUserPass> 
                                <serverBindings> 
                                        <binding port="80" ipAddress="10.18.0.23"  
                                        hostHeader=www.northwindtraders.com mode="delete" /> 
                                        <binding port="80" ipAddress=""  
                                        hostHeader=www.northwindtraders.com mode="append" /> 
                                </serverBindings> 
                                <serverAutoStart>1</serverAutoStart> 
                                <frontpageExtendWeb>1</frontpageExtendWeb> 
                                <properties> 
                                        <property name="DefaultDoc"> 
                                        default.asp,default.aspx,default.htm,index.htm</property>           
                                        <property name="AppPoolId" create="1">SharedAppPool 
                                        </property> 
                                </properties> 
                                <megabytes>10</megabytes> 
                        </executeData> 
                </execute> 
        </procedure> 
</request> 

Example XML Response

The following is an example of an XML response from the xxx procedure of the Managed Windows-based Hosting Namespace:

Applies To

Managed Windows-based Hosting Namespace API for:

  • Hosted Messaging and Collaboration version 3.5

  • Hosted Messaging and Collaboration version 3.0

  • Windows-based Hosting version 4.5

  • Windows-based Hosting version 4.0

  • Windows-based Hosting version 3.5

  • Windows-based Hosting for Applications version 1.0

See also

Tasks

Windows-based Hosting::DeleteCustomerWebSite
Windows-based Hosting::DeleteCustomerWebSite
Windows-based Hosting::ControlCustomerWebSite