Recent Articles

ASP.NET School For The Online Mind
A New Jersey firm now offers three online courses in ASP.NET programming, delivered through a browser. TeachMeIT recently added Programming with Microsoft...
Blinq Instantly Builds ASP.NET Sites
Microsoft's Web Language Integrated Query tool called Blinq can generate ASP.NET websites based on...

Atlas Can Lift ASP Development
Microsoft offers its version of an Ajax framework called Atlas, which integrates cross-browser script libraries with ASP.NET server-side development.



Recent WebProNews Articles

Google, Yahoo Profiting In China
Search advertising has become a booming market in China, a result that will hearten executives at search engines who have been criticized over their involvement....

But Facebook Has A Great Personality
Microsoft put on his beer goggles and scanned the room of leftover prospects, still deep in their cliques (they...

Google Pitching Jobs To SciFi Geeks
When the World Science Fiction Convention, best known as WorldCon, starts up in Anaheim today, some...

Microsoft Stages Cybersquatter Shootout
Microsoft swaggered out of Redmond today with steely eyes and leathery skin, heeled with a pair of six shooters aimed at cybersquatters - four of them Microsoft knows...

08.25.06


ASP.NET: Testing A File-system Web Site With IIS

By Joel Murach

This article is an excerpt from the book: Murach's ASP.NET 2.0 Web Programming with C# 2005.

When you run a file-system web site, it runs under the ASP.NET Development Server by default. Because this server has limitations, however, you'll want to be sure to test a file-system web site under IIS as well as under the development server. Figure 4-6 describes how you do that.

To start, you need to create a virtual directory for the web site as described in figure 4-1. Then, if you open the web site from this virtual directory, it will automatically run under IIS. Alternatively, you can open the file-system web site directly and change its start options so the URL you specify is used to start the application. In this figure, for example, you can see that the Use Custom Server option has been selected and the URL for the web site's virtual directory has been entered in the Base URL text box.

This figure also lists the limitations of the ASP.NET Development Server. The most significant of these limitations is that it always runs under the current user's security context, but your own user account probably has stronger security privileges than the account IIS runs ASP.NET applications under. As a result, when you move the application to a production web server, you may have to contend with security issues that weren't apparent when you tested with the development server, especially if you access files or databases located in folders outside of the application's folder structure.

The Casino Affiliate Convention
Register Early and save!

The dialog box for specifying a web server



How to test a file-system web site with IIS

• Create a virtual directory for the web site as described in figure 4-1.

• Open the web site from its virtual directory, or open the file-system web site and then use the Property Pages dialog box shown above to specify the URL for the virtual directory.

• Run the application using one of the techniques in figure 4-4.

Limitations of the ASP.NET Development Server

• Can serve pages only to the local computer.

• Runs in current user's security context, so it doesn't accurately test security issues.

• Does not include an SMTP server, so it can't be used to test email applications.

• Uses a randomly chosen port rather than the standard HTTP port 80.

Description

• By default, a file-system web site is run using the ASP.NET Development Server. To run a file-system web site using IIS, you can use one of the techniques above.

• To open the Property Pages dialog box, right-click the project in the Solution Explorer and select Property Pages from the shortcut menu. Then, to change the server that's used to run the web site, click the Start Options node, select the Use Custom Server option, and enter the URL of the virtual directory for the web site.


About the Author:
Joel Murach has been writing and editing for more than 10 years. During that time, he sharpened his programming skills as a contract programmer in San Francisco and his instructional skills as a trainer for HarperCollins Publishing. He always brings a vision to his projects that leads to improved effectiveness for his readers.

About WebProASP
WebProASP is a collection of up to date tutorials and insightful articles designed to help ASP users of any skill level implement successful ASP systems and practices. ASP Strategies and Tactics for Business

WebProASP is brought to you by:

SecurityConfig.com NetworkingFiles.com
NetworkNewz.com WebProASP.com
DatabaseProNews.com SQlProNews.com
ITcertificationNews.com SysAdminNews.com
WebProASP.com WirelessProNews.com
CProgrammingTrends.com ITManagementNews.com




-- WebProAsp is an iEntry, Inc. publication --
iEntry, Inc. 2549 Richmond Rd. Lexington KY, 40509
2006 iEntry, Inc.  All Rights Reserved  Privacy Policy  Legal

archives | advertising info | news headlines | free newsletters | comments/feedback | submit article



ASP Strategies and Tactics for Business WebProASP News Archives About Us Feedback WebProASP Home Page About Article Archive News Downloads WebProWorld Forums Jayde iEntry Advertise Contact