ASP.NET
  Home arrow ASP.NET arrow Page 2 - How to Test and Debug an ASP.NET 2.0 Appli...
ASP Free Forums 
.NET  
ASP  
ASP Code  
ASP.NET  
ASP.NET Code  
BrainDump  
C#  
Code Examples  
Database  
Database Code  
IIS  
Microsoft Access  
MS SQL Server  
Silverlight  
Visual Basic.NET  
Windows Scripting  
Windows Security  
XML  
Mobile Linux 
App Generation ROI 
IBM® developerWorks 
ASP Web Hosting  
ASP.NET Web Hosting 
Windows Web Hosting
 
Weekly Newsletter
 
Developer Updates  
Free Website Content 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Write For Us Get Paid 
Request Media Kit
Contact Us 
Site Map 
Privacy Policy 
Support 
 USERNAME
 
 PASSWORD
 
 
  >>> SIGN UP!  
  Lost Password? 
ASP.NET

How to Test and Debug an ASP.NET 2.0 Application
By: Murach Publishing
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: 4 stars4 stars4 stars4 stars4 stars / 8
    2006-05-11

    Table of Contents:
  • How to Test and Debug an ASP.NET 2.0 Application
  • How to create a remote IIS web site
  • How to test an ASP.NET application
  • How to test an application with a browser other than the default
  • How to test a file-system web site with IIS

  • Rate this Article: Poor Best 
      ADD THIS ARTICLE TO:
      Del.ici.ous Digg
      Blink Simpy
      Google Spurl
      Y! MyWeb Furl
    Email Me Similar Content When Posted
    Add Developer Shed Article Feed To Your Site
    Email Article To Friend
    Print Version Of Article
    PDF Version Of Article
     
     
    ADVERTISEMENT


    How to Test and Debug an ASP.NET 2.0 Application - How to create a remote IIS web site


    (Page 2 of 5 )



    A remote web site is similar to a local web site except that a remote web site resides on a computer that you have access to over a LAN. To create this type of web site, FrontPage Server Extensions must be installed on the remote computer. Then, you can just select the HTTP location option and enter the location of the web site as shown in figure 4-2. Here, a web site named Ch03Cart is being created in a directory named ASPNET2005 on a server named mma1.

    Although you use the same techniques to work with a remote web site as you use to work with a local web site, you should realize that the permissions for a remote web site may not be set the way you want. For example, suppose you create a web site that writes to a text file that’s stored in the App_Data folder of the site. To do that, the web site must have write permissions on that folder. By default, though, a remote web site is given only read permissions. Because of that, you’ll need to have the system administrator assign the appropriate permissions to the web site.

    The dialog box for creating a remote IIS web site


    Figure 4-2.  How to create a remote IIS Web site


    Description

    1. To create a remote web site, select HTTP from the Location drop-down list. Then, enter the URL of the web site you want to create.
    2. You can also create a remote web site by clicking the Browse button and then using the Choose Location dialog box that’s displayed for a remote site. However, this dialog box doesn’t provide any additional options.
    3. By default, a web application that you create on a remote server doesn’t have the permissions needed to change files in the web site at runtime. If an application needs to change a file, then, you’ll need to contact the system administrator about giving it the appropriate permissions.
    4. Visual Studio communicates with a web site on a remote server using HTTP and FrontPage Server Extensions. Because of that, FPSE must be installed on the remote server. For information on how to install FPSE, see appendix A.

    How to create an FTP web site

    An FTP web site is a web site that resides on a remote computer and that supports FTP file transfers. In most cases, FTP web sites are hosted on a server that you have access to over the Internet. In that case, the web site may already be set up for you. If not, you can use the Choose Location dialog box shown in figure 4-3 to create a new web site.

    To display this dialog box, select FTP for the location option from the New Web Site dialog box, and click the Browse button. Then, enter the name of the server where you want to create the site and the path to the directory where the files for the web site will be stored. Note that except for the final directory, all the directories in the directory path must already exist. In this example, that means that the Murach directory must already exist. That’s because this directory maps to a virtual root that must be set up on the server. The virtual root works much like an IIS virtual directory. However, it points to the location where files are transferred to and from the server.

    In addition to the server name and directory path, you can specify the port that Visual Studio should use to send commands to the server, you can specify whether the connection to the server is established using active or passive mode, and you can specify whether you’re logged in as an anonymous user or an authenticated user. In most cases, you’ll leave the port set at 21. However, you may need to change the Passive Mode and Anonymous Login options.

    By default, Visual Studio uses active mode to establish a connection with the FTP server. To understand how active mode works, you need to realize that two ports are required to use FTP: one to transmit commands and one to transmit data. In active mode, Visual Studio connects to the server using the command port and then passes the address of the data port to be used to the server. Then, the server connects to Visual Studio using the data port.

    The problem with using active mode is that if the client computer is behind a firewall, the server probably won’t be able to connect to it. In that case, you can connect to the server using passive mode. With passive mode, Visual Studio establishes the connections for both the command port and the data port. To use passive mode, just select the Passive Mode option.

    In some cases, an FTP server will require that you provide a username and password to connect to the server. Then, you’ll need to remove the check mark from the Anonymous Login option and enter the required information in the Username and Password text boxes that become available. Note that because this information is saved until you end Visual Studio, you only need to enter it the first time you connect to the server during a Visual Studio session.

    After you enter the required information into the Choose Location dialog box, you click the Open button to return to the New Web Site dialog box. When you do, the location will look something like this:

      ftp://Murach/Ch03Cart

    Then, you can just click the OK button to create the web site.

    The dialog box for creating an FTP web site 
                                                  


              Figure 4-3.  How to create an FTP web site

    Description

    • To create a new FTP web site, select FTP from the Location drop-down list in the New Web Site dialog box. Then, click the Browse button to display the Choose Location dialog box shown above.
    • Enter the name of the server and the directory where you want to create the web site. You can typically leave the port set at 21.
    • Visual Studio can use either active mode or passive mode to establish connections to the FTP server. Active mode is the default. If the client is behind a firewall, though, you may need to use passive mode. To do that, select the Passive Mode option.
    • By default, Visual Studio logs you in to the FTP server as an anonymous user. However, some FTP servers require you to provide a username and password. In that case, you can deselect the Anonymous Login option and then enter your username and password. The username and password are saved until you end the Visual Studio session.
    • If you try to create a new FTP web site by entering a URL in the New Web Site dialog box, Visual Studio will display a dialog box that lets you specify whether you want to use passive mode and whether you want to log in as an anonymous user.
    • IIS can be configured to act as an FTP server as well as a web server. For more information, please see appendix A.

    More ASP.NET Articles
    More By Murach Publishing


       · This article is an excerpt from the book "Murach's ASP.NET 2.0 Web Programming with...
     

    Buy this book now. This article is excerpted from chapter four of the book Murach's ASP.NET 2.0 Web Programming with VB 2005, written by Joel Murach and Anne Boehm (Murach, 2006; ISBN: 1-890774-32-4). Buy this book now.

    ASP.NET ARTICLES

    - Adding Content to a Static ASP.NET Website
    - Building a Static ASP.NET Website in a Basic...
    - Develop Your First ASP.NET Website with Visu...
    - Run ASP.NET in Windows XP Home with Cassini ...
    - How to Test a Web Application
    - How to Add Code and Validation Controls to a...
    - Working in Source and Split Views to Build a...
    - How to Build a Web Form for a One-Page Web A...
    - How to Develop a One-Page Web Application
    - An ASP.NET Web Application in Action
    - Developing ASP.NET Web Applications
    - An Introduction to ASP.NET Web Programming
    - Introduction to the ADO.NET Entity Framework...
    - Completing an In-Text Advertising System und...
    - Programming an In-Text Advertising System un...





    © 2003-2009 by Developer Shed. All rights reserved. DS Cluster 4 Hosted by Hostway
    For more Enterprise Application Development news, visit eWeek