Create a Service Module

The Microsoft Provisioning System (MPS) Sample Provisioning UI Service Modules are implemented as ASP.NET User Controls. In this section, you will use Microsoft Visual Studio 2005 and the sample components in the Sample Provisioning User Interface Framework to create a sample service module.

Procedure MPSSDK.x: To create a service module using the Sample Provisioning User Interface Framework
  1. Add a folder named DemoServiceModule under ServiceModules folder in the project.
  2. Navigate to the DemoServiceModule folder in the Project Solution folder, and then click Add new item.
  3. Select the ServiceModule item (which is available in C# language option only) from the list, and then set the name to DemoServiceModuleAction.ascx.
  4. In the design view of the user control, add the following components:
    • A label server control for displaying the error message for error scenarios. This is already available in the template.
    • A panel control that will be used as a placeholder for all the input controls (both required fields and optional fields to be placed here). This panel will be referred to as the Global panel. This is already available in the template.
    • An empty panel control. This is just a placeholder panel, which will be used by the framework. All the optional fields will be automatically moved to this panel at runtime. This panel will be referred to as the Optional fields panel. This is already available in the template.
    • A Submit button that will be used to post the information entered in the UI to a Web service. The Submit button (and any other button such as, for example, Cancel) should be placed below the Optional fields panel. This is already available in the template.

If you intend to develop a service module that uses the sample service module validator, your project must meet the following prerequisites:

Verify that the user control class in the code used by DemoServiceModule.ascx.cs inherits from ServiceModuleBaseUserControl class. This inheritance is set in the template by default. This sample also includes code that:

Examples of how you can use or extend this sample code include: