Windows-based Hosting::ControlCustomerWebSite
This procedure starts, stops, or pauses a specified Web site.
Arguments
Input Arguments | Description |
---|---|
<orgLdapPath> |
The Lightweight Directory Access Protocol (LDAP) path of the owning organization. |
<webSiteName> or <webSitePath> |
The unique web site name that was established when the site was created or the IIS metabase path. |
<serverState> |
Valid integer values are as follows:
|
Remarks
Method Syntax
public string ControlCustomerWebSite(
string orgLdapPath,
string location,
string webSiteName,
string serverState,
bool sendCredentials)
Sample Code
Example XML Request
No example XML request.
Example XML Response
<response>
<data>
<orgLdapPath>LDAP://OU=WingTipToys,OU=consolidatedmessenger,OU=Hosting,DC=fabrikam,DC=Com</orgLdapPath>
<preferredDomainController>AD01-wh.fabrikam.com</preferredDomainController>
<webSiteName>www.impl1.com</webSiteName>
<serverState>4</serverState>
</data>
</response>
Typical C# Usage
//Get user name and password.
string userName = this.Request.ServerVariables.Get("AUTH_USER");
string pass = this.Request.ServerVariables.Get("AUTH_PASSWORD");
//Set credentials.
objWS.PreAuthenticate = true;
objWS.Credentials = new NetworkCredential(userName,pass);
lblMsg.InnerHtml = mpsResponseHeaderLabel;
//Display response.
this.mpsResponse.DocumentSource = ""; response=objWS.ControlCustomerWebSite(orgLdapPath, location, webSiteName, serverState, true);
// set the response XML to match the return from MPF
responseXml.LoadXml(response);
this.mpsResponse.Document = responseXml;
lblDone.InnerText = successMsg;
Applies To
Managed Windows-based Hosting Web Service 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::CreateCustomerWebSite
Windows-based Hosting::ModifyCustomerWebSite
Other Resources
Windows-based Hosting::DeleteCustomerWebSite [HMC SDK2]