ASP.NET Logo Back to WebMatrix Home

 
Your First ASP.NET Page
Run a page using the built-in ASP.NET Web Matrix Web Server

 
ASP.NET Web Matrix supports multiple Web Server deployment options for hosting and testing an ASP.NET application; including the ASP.NET Web Matrix Web Server, Microsoft Internet Information Server (IIS), and remote ISP Hosting providers.

In this walkthrough, you will save and run the ASP.NET page you developed in the previous section using the built-in ASP.NET Web Matrix Web Server.  This simple web server is automatically installed with ASP.NET Web Matrix and does not require any other web server to be installed on your machine (ideal for quick development scenarios).

To run your page using the ASP.NET Web Matrix Web Server, please follow the steps below:

  1. Save the ASP.NET page. There are two ways to save a file in the ASP.NET Web Matrix development environment:

     
    1. Choose Save from the File menu. 

      Save File Via File Menu
       

    2. Click the Save File button on the Standard toolbar. 

      Save File Via Toolbar
       

  2. Run the ASP.NET page. There are three ways to run a page in the ASP.NET Web Matrix development environment:

     
    1. Choose Start from the View menu. 

      Start Via View Menu
       

    2. Click the Start button on the Standard toolbar. 

      Start Via Toolbar

    3. Press the F5 key. This shortcut causes the the page to run.

       


     

  3. Selecting any of the above run options will display the Start Web Application dialog:
    Start Web App Dialog
    There are two options in the Start Web Application dialog box:

    • Use ASP.NET Web Matrix Server: choose this option to host the web application using the built-in web server that ships with ASP.NET Web Matrix.  Note that the ASP.NET Web Matrix Server supports only local browser requests (for security reasons). This means you cannot browse any of the pages remotely.

     

     

    • Use a new IIS Virtual Root: choose this option to host the web application using the Microsoft IIS web server.   Note that this option is discussed in a later section of the Guided Tour.

     

     

     

  4. Click the Use ASP.NET Web Matrix Server option and type 8080 in the Application Port box.

     
  5. Click the Start button. 

    Start Web App Dialog
     
  6. The ASP.NET Web Matrix Server will start and an icon will appear in the system tray. 

    Matrix Web Server System Tray Icon
    Note The Start Web Application dialog and ASP.NET Web Matrix Server system tray icon notification appear the first time you run the page. On subsequent page runs, ASP.NET Web Matrix will use the Web Server that was specified the first time you ran the page. ASP.NET Web Matrix will not prompt you to specify a Web Server again until you either close and reopen the ASP.NET Web Matrix development environment and run the page again or manually shut down and restart the ASP.NET Web Matrix Server.

     

     

  7. Your ASP.NET page you developed in the previous section will now automatically appear in a new instance of your Web browser. Type a name in the TextBox and click the Button. The name will appear in the welcome message displayed in the Label

    My First Web Page
  8. Close the Web browser instance.

Next Step >>