Article
Getting Started with ASP.NET
Installing ASP.NET
If you'll be working on a Web host that supports ASP.NET, everything in this section has already been done for you, and you can safely skip ahead. If not, you'll need to set up your machine as a local Web server equipped with ASP.NET, and that's exactly what I'll show you how to do.
Before you install ASP.NET, you must have Microsoft Internet Information Services (IIS) installed. If you don't (or if you're not sure), complete the following steps to install it:
- Open Control Panel
- Click Add/Remove Programs
- Click Add/Remove Windows Components
- Select IIS from the list of components
- Follow the onscreen prompts to complete installation
You'll need to have your Windows CD on hand, so make sure you dig it out of the closet in advance.
Once IIS is installed, you can make sure it's working properly by opening Internet Explorer (or any other Web browser) and typing http://localhost/ into the address field. When you press Enter, the browser should load a page that introduces IIS and provides the documentation for the server.
With IIS installed, you're ready to add ASP.NET support. ASP.NET is part of the .NET Framework, Microsoft's new multi-language development platform for Windows Internet applications. To develop ASP.NET Web sites, you'll need at least the .NET Framework Redist, which contains everything you need to run .NET applications, including ASP.NET Websites on your computer. You may also want to obtain the .NET Framework SDK, which contains example applications and full reference documentation for programmers.
The .NET Framework Redist and the .NET Framework SDK are free downloads provided by Microsoft. At this time, you can reach the download page directly at this address: http://www.asp.net/download-1.1.aspx Be aware that the Redist and SDK together add up to 131MB of downloads, so if you're on a modem this could take some time!
Once you've downloaded the SDK, run the .NET Framework Redist installation file. The program may warn you that your Windows Installer and/or Microsoft Data Access Components (MDAC) are out of date. Allow the program to update your Windows Installer automatically if it asks to. If your MDAC is out-of-date, cancel the SDK installation and download the latest MDAC (2.7 as of this writing) from http://www.microsoft.com/data/ before starting the SDK installation over.
If you downloaded the SDK, run its installer once the .NET Framework Redist is finished installing. When the installers are done, ASP.NET will be installed on your system.
Testing ASP.NET
A good way to make sure that ASP.NET is working properly on your system is to configure the .NET Framework SDK samples (assuming you downloaded the SDK). On your Start menu, you'll find a new folder called Microsoft .NET Framework SDK. Inside this folder, click Samples and QuickStart Tutorials.
Internet Explorer will open with a page that lists two steps that you need to complete before the samples and tutorials are available:
- Install the .NET Framework Samples Database
- Set up the QuickStarts
Go ahead and click the first link, then click Open in the dialog that appears to run the database installation. Don't be confused by the mention of Microsoft SQL Server in the description of Step 1; the program will silently install MSDE, a standalone version of SQL Server on your system to host the samples that require a database backend.
When Step 1 is finished, click Step 2 to have it fill the newly-installed database with the sample data for the QuickStart Tutorials. When Step 2 completes, click Launch to go to the QuickStart Tutorials homepage (you can get to this page in future by clicking the same icon as before on your Start Menu).
Since the focus of this article is on ASP.NET development, click the ASP.NET QuickStarts link. If you are taken to the ASP.NET QuickStart Tutorial, you can rest assured that ASP.NET is properly installed on your system. The tutorial itself is written in ASP.NET, so if you can view the tutorial, your server can run ASP.NET.
The QuickStart Tutorial gives plenty of examples of ASP.NET in action, but unless you're an experienced programmer, you'll need a little more guidance before you can learn purely by example. Mere mortals in the audience are therefore advised to close their browser and read on...