Lab: Building and Deploying a Web Application

Lab: Building and Deploying a Web Application

In this lab, you ll prepare a Web application for deployment, deploy the application to a server, and monitor and tune the application s performance. Before you begin, choose one of the applications you completed in an earlier chapter or choose a Web application that you have completed on your own to use for the exercises that follow.

This lab covers material that applies to all types of Web applications, so it will be more interesting if you choose an application you want to share with others or are interested in using yourself over the Internet.

Estimated lesson time: 30 minutes

Exercise 1: Prepare the Application

In this exercise, you ll build a release version of the Web application. Use the skills you learned in Lesson 1 to complete the following major tasks:

  1. Identify the application and set its version number in the AssemblyInfo.vb or AssemblyInfo.cs file.

  2. Set the compilation element s debug attribute to false in the application s Web.config file.

  3. Set the application s build option to Release.

  4. Build the application.

Exercise 2: Deploy the Application

How you deploy your application depends on the type of server you have available. If you are hosting your applications through a Web hosting service, as discussed in Chapter 1, Introduction to Web Programming, use the Visual Studio .NET upload tools to deploy your application to the hosting service.

If you are hosting applications on your own server, use the skills you learned in Lesson 2 in this chapter to perform the following tasks:

  1. Create a virtual folder for the application using IIS on the server.

  2. Copy the Web application to the virtual folder.

  3. View the security settings on the server to verify that the ASPNET user account has the permissions to perform the tasks required by your application.

  4. If needed, grant access to resources used by your application.

  5. Run the application from the server to verify that your security settings allow the application to run correctly.

Exercise 3: Chart Application Performance

In this exercise, you ll use the MMC Performance snap-in to keep a log of the number of requests processed by ASP.NET and chart those requests against processor activity on the server. When complete, the chart will appear similar to that shown in Figure 9-39.

figure 9-39 charting web application performance

Figure 9-39. Charting Web application performance

Use the skills you learned in Lesson 3 to perform the following tasks:

  1. Run the MMC Performance snap-in and connect to the server that s running the deployed Web application. If you deployed your application to a Web hosting service in Exercise 2, you won t be able to connect to that server. Instead, run the Web application locally on your development machine and connect to your local machine instead.

  2. Create a new counter log named Exercise 3.

  3. Add the counters to the log, as shown in the following table:

    Performance object

    Counter

    Processor

    %Processor time

    ASP.NET applications

    Anonymous requests

    ASP.NET

    Applications running

    ASP.NET

    Worker processes running

  4. Start the counter log and then stop it after a few minutes to collect data about the server.

  5. Select the System Monitor in the snap-in, and change the monitor s properties to view the log files:

    1. Right-click the System Monitor, and select Properties from the shortcut menu.

    2. Click the Properties Source tab, select Log Files, and then click Add to add the log files to the monitor.

    3. Click the Properties Data tab, and then click Add to add the ASP.NET counters to the monitor.

    4. On the Properties Data tab, set the scale of each of the ASP.NET counters to 10.

    5. Click OK to view the log as a chart.

    6. In the System Monitor, select Report to view the log data in text form.

    7. Experiment with other counters, such as ASP.NET application errors, cache hits, and so on.



MCAD(s)MCSD Self-Paced Training Kit(c) Developing Web Applications With Microsoft Visual Basic. Net and Microsoft V[.  .. ]0-315
MCAD(s)MCSD Self-Paced Training Kit(c) Developing Web Applications With Microsoft Visual Basic. Net and Microsoft V[. .. ]0-315
ISBN: N/A
EAN: N/A
Year: 2003
Pages: 118

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net