Share via


Windows-based Hosting::CreatePlan

This procedure adds a new plan to the available plans.

Arguments

Input Arguments Description

<preferredDomainController>

The name of the preferred domain controller.

<planName>

A valid service plan that will be added to the list of available plans.

<planTypeName>

The plan type.

<planDescription>

The plan description.

<sendCredentials>

<planCategories>/<category>

Existing category names to assign plan to.

<planFeatures>/<feature>

Existing plan features to assign to the plan.

Remarks

Method Syntax

 
public string AddPlan( 
                string preferredDomainController 
                string planName, 
                string planTypeName, 
                string planDescription, 
                string planCategoriesXmlString, 
                string planFeaturesXmlString, 
                bool sendCredentials) 
        

Sample Code

Example XML Request

No example XML request.

Example XML Response

MPS XML Response in string format:

 
<response> 
        <data> 
        </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.    
        WbH.PreAuthenticate = true; 
        WbH.Credentials = new NetworkCredential(userName,pass); 
        lblMsg.InnerHtml = mpsResponseHeaderLabel; 
 
        //Display response. 
        this.mpsResponse.DocumentSource = ""; 
        response = WbH.CreatePlan(preferredDomainController, planName, planDescription, planTypeName, planCategoriesXmlString, planFeaturesXmlString,true); 
        // set the response XML to match the return from MPF 
        responseXml.LoadXml(response); 
        this.mpsResponse.Document = responseXml; 
 

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::EnablePlan
Windows-based Hosting::DisablePlan