Managed Web Hosting::ModifyCustomerWebSite

The ModifyCustomerWebSite method provides for modification of a limited set of Web site properties.

Arguments

Input argument Required Description

<org>

Yes

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

<webSiteName> or <location>

Yes

For this parameter, use the unique Web site name that was established when creating the site, or you can use the IIS metabase path.

<preferredDomainController>

Yes

The name of the preferred domain controller.

<frontpageExtendWeb>

No

Allowed values are "1," which installs FrontPage extensions, or "0" which does not install the extensions. If "1" is specified and extensions are already installed, an exception will not be thrown. If "0" is specified and extensions are not installed, an exception will be thrown.

<anonymousUserPass>

No

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>

No

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

<serverBindings>

No

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

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

No

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

  • 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>

Yes

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

  • @ipAddress - This optional parameter can be omitted or included as zero-length to represent "all unassigned."

  • @hostHeader - This optional parameter can be zero-length or omitted.

  • @port - A required parameter.

  • @mode - Optional parameter that 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>

No

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

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

  • AppFriendlyName - An optional string. Defaults to "Default Application".

  • AppIsolated - An optional integer. Uses IIS default.

  • AppPoolId - An optional) string. IIS 6.0 only.

    • @create - An optional parameter. Set to "1" to create the app pool if it does not exist. Default is "0".

  • Path - An optional parameter that sets the local path of the Web site root.

  • AuthFlags - Optional authorization flags for the IIS server.

  • DefaultLogonDomain - An optional parameter that sets the default login domain.

<keys>

No

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

<ServerComment>

No

The ServerComment is the display string that you see in ISM.

Remarks

Process Steps

The following steps occur when modifying a Web site with the ModifyCustomerWebSite method of the Managed Web Hosting Namespace:

  1. Install or remove FrontPage extensions if specified.

  2. Set the anonymous user account password if specified.

  3. Create a UNC user if uncUserPass is supplied and the user does not exist.

  4. Set the UNC user password if uncUserPass is supplied.

  5. Add or remove server bindings as specified.

  6. Set Root Web properties if specified.

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

  8. Set the child <keys> properties if supplied.

Security

The ModifyCustomerWebSite method has the following security requirements:

  • The caller is impersonated.

  • The caller is tested for OrgCreator permissions by checking for membership in any of the following groups:

    • Domain Admins

    • Hosting Admins

    • Reseller Admins

Sample Code

Example XML Request

The following is an example of an XML request for the ModifyCustomerWebSite method of the Managed Web Hosting Namespace:

<request> 
        <procedure> 
                <execute namespace="Managed Web Hosting"  
                procedure="ModifyCustomerWebSite" impersonate="1"> 
                        <executeData> 
                        <preferredDomainController>AD01.fabrikam.com 
                        </preferredDomainController> 
                        <org>LDAP://OU=alpineskihouse,OU=consolidatedmessenger, 
                        OU=Hosting,DC=fabrikam,DC=Com</org> 
                        <webSiteName>www.alpineskihouse.com</webSiteName> 
                        <serverComment>www.alpineskihouse.com</serverComment> 
                        <serverBindings mode="edit"> 
                        <binding port="80"  
                         ipAddress="" hostHeader="support.alpineskihouse.com"  
                         mode="append" /> 
                        <binding port="80" ipAddress=""  
                         hostHeader="help.alpineskihouse.com"  
                         mode="delete" /> 
                        <binding port="80" ipAddress=""  
                         hostHeader="shop.alpineskihouse.com"  
                         mode="append" /> 
                        </serverBindings> 
                        <properties> 
                                <property name="AppPoolId">AnotherPool</property> 
                        </properties> 
                        </executeData> 
                        <after source="executeData" destination="data" mode="merge" /> 
                </execute> 
        </procedure> 
</request> 

Example XML Response

No example XML response.

Applies To

Managed Web Hosting Namespace API for:

  • Hosted Messaging and Collaboration version 4.5

  • Hosted Messaging and Collaboration version 4.0

  • 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

Managed Web Hosting::CreateCustomerWebSite
Managed Web Hosting::DeleteCustomerWebSite
Managed Web Hosting::ControlCustomerWebSite