Self Provision

The Self Provision sample allows enterprise users to provision themselves for MapPoint Location Server.
Users provision themselves through the following process:

A user supplies required information (a phone number).

The system sends a personal identification number (PIN) by means of Short Message Service (SMS) to the device specified by the user.

The user enters the PIN on the form during the same session (to ensure that the user is the owner of the device).

The page provisions the user.

Running the Sample in Visual Studio .NET 2003

Note   You must install the Server API assemblies along with Microsoft .NET Framework v1.1 on your development computer to run this sample. sample. For more information about requirements, see MapPoint Location Server Application Development Requirements.

To run the sample

  1. Tn Microsoft® Visual Studio® .NET, on the File menu, point to New, and then click Project.

  2. In the left pane of the New Project dialog box, click Visual Basic Projects or Visual C# Projects, and then click the ASP.NET Web Application template.

  3. In Location, change WebApplication1 to SelfProvisioning, and then click OK.

    For example, change https://localhost/WebApplication1 to https://localhost/SelfProvisioning.

    Note  If you use a different name, replace SelfProvisioning with your project name in all project files.

    Note To turn off anonymous access and allow Microsoft Windows® Authentication for this project, use the following steps:

    1. On your Web server, on the Start menu, point to Settings, click Control Panel, and then double-click Administrative Tools.

    2. Double-click Internet Information Servics, expand <your server name>, expand Web Sites, expand Default Web Site , and then expand <your-project-name>.

    3. Right click <your-project-name>, and then click Properties.

    4. Click the Directory Security tab and then click the Edit button in the Anonymous access and authentication control section.

    5. Clear the Anonymous access check box, and then select the Integrated Windows authentication check box as shown in the following illustration.

    6. Click OK twice and close the Internet Information Services administrative window.

  4. On the Project menu, click Add Existing Item.

  5. Navigate to the appropriate project subfolder in the Self Provisioning folder, select All Files in the Files of type box, and then select all the available files.

    • The default location for Visual Basic .NET project files is:
      \Program Files\Microsoft MapPoint Location Server SDK, Version 1.0\Samples\Self Provisioning\vb
    • The default location for Visual C# .NET project files is:
      \Program Files\Microsoft MapPoint Location Server SDK, Version 1.0\Samples\Self Provisioning\cs

    Note  When prompted, replace any existing files.

  6. In Solution Explorer, click WebForm1.aspx.

  7. On the Edit menu, click Delete, and then click OK.

  8. In Solution Explorer, right-click References, and then click Add Reference.

  9. Click Browse, and then add the following assemblies:

    • Microsoft.MapPoint.LocationServer.Management.dll
    • Microsoft.MapPoint.LocationServer.Types.dll
    • Microsoft.MapPoint.LocationServer.Core.dll
  10. In the Web.config file, set the values for the following application keys:

    • SqlServer—Assign the name of the Microsoft® SQL Server™ 2000 instance.
    • SqlDatabase—Assign the name of the MapPoint Location Server database.
    • Notification_Provider_1—Assign the fully-qualified domain name (FQDN) of your mobile operator's SMTP-SMS gateway.
    • SmtpServer—Assign the name of your Simple Mail Transfer Protocol (SMTP) server.
    • LocationProviders—Assign the names of all valid location providers separated by the pipe character ( | ).
    • NotificationProviders—Assign the names of all valid notification provider separated by the pipe character ( | ).
    • Identity Section—Assign a user that belongs to the MLSUSERPROVISIONER security group as follows:

          <identity impersonate="true" userName= "domain\user" password= "password"></identity>

          Security note  To help keep your self-provisioning application more secure, use encrypted values for both the userName and password. For more information about securing Web.config settings, see this Microsoft Knowledge Base article.

  11. On the File menu, click Save Web.config.

  12. Right-click Default.aspx and click Set as Start Page.

  13. On the Debug menu, click Start.

See Also

Sample Code