Share via


Mobile Application Sample

Mobile Application Sample

This Mobile Web application requires the Microsoft Mobile Internet Toolkit to run. This sample asks the end-user for an address and then displays a list of nearby coffee stores (using the sample customer data source MapPoint.FourthCoffeeSample). When the end-user selects a store location, a map and directions to the store are displayed.

To run this sample in Microsoft® Visual Studio® .NET, your Visual Studio .NET installation must be set up to run and debug ASP.NET applications and Internet Information Services (IIS) must be running. For more information about for information on installing IIS and setting up Visual Studio .NET, see the Visual Studio .NET product documentation. You must also have the Microsoft Mobile Internet Toolkit installed. Visit https://www.microsoft.com/downloads/details.aspx?FamilyId=AE597F21-B8E4-416E-A28F-B124F41F9768&displaylang;=en to download the Mobile Internet Toolkit.

Running the sample

Note To run the Visual Basic® .NET version of this sample, replace cs with vb in the following procedure.

  1. In the IIS virtual root directory, create a new folder called PocketIECS. The default path to the virtual root is C:\Inetpub\Wwwroot\.

  2. Copy the files in the SDK_Install_Folder\Samples\[.NET 1.1 | .NET 2.0]\MobileApplications\PocketIE\Cs directory to PocketIECS.

  3. Navigate to the new folder, and then double-click the PocketIECS.csproj file to open it.

  4. Right-click the Web reference MapPointService and then click Update Web Reference.

  5. In the Solution Explorer, double-click the file Web.config to open it, and then set the values of the MPUser and MPPass keys to your customer ID and password, respectively.

  6. On the File menu, click Save to save the Web.config file.

  7. Right-click the PocketIEApp.aspx and then click Set as Start Page.

  8. To enable debugging for the application on your Web server, navigate to the Control Panel, then double-click Administrative Tools, and then double-click the Internet Information Services, and then do the following:

    • Double-click , then double-click the Web Sites, and then double-click the Default Web Site.

    • Right-click PocketIECS, and then click Properties.

    • On the Directory tab, in Application Settings, click Create, and then click OK.

  9. On the Debug menu, click Start.