Monday, May 14, 2007

Visual Studio .NET 2003, ASP.NET v1.1, and Windows Vista

I recently needed to make a .NET Framework v1.1 application work on Windows Vista, which meant debugging it and running the development environment on a Windows Vista Business machine.

While quite possible, it did give me some headaches.

Enable the IIS 7 Product Feature

Obviously, if you need to work with ASP.NET applications, you need IIS. Windows Vista comes with IIS 7, which is vastly different from the IIS 6 architecture.

You can install IIS 7 from the "Programs and Features" control panel, under "Turn Windows features on or off." I recommend choosing all the items under "Internet Information Services" : "Web Management Tools" : "IIS 6 Management Compatibility" when you install the rest of IIS.

Install Microsoft .NET Framework v1.1

Windows Vista does not come with v1.1 of the framework pre-installed. Instead, you need to download and install these packages:


When installing, be sure to right-click on the install package and select "Run as administrator."

After you're done installing these packages, run the command prompt as administrator, and then CD to C:\Windows\Microsoft.NET\Framework\v1.1.4322. Run the following command:


aspnet_regiis -ir -enable


Install Visual Studio .NET 2003

This is the easy part. Visual Studio .NET 2003 will work on Windows Vista, but it's a bit quirky. First off, the installer won't be able to install all of the prerequisites (specifically FrontPage Extensions). I was able to skip that part and install just fine, however. Make sure when you install, you right-click on the installer package and select "Run as administrator." Install Visual Studio .NET 2003 Service Pack 1 as well.

After it's installed, Visual Studio .NET 2003 will fail to run in its default state. Unfortunately, you have to run it with elevated privileges. In order to do this every time without right-clicking and selecting "Run as administrator," follow these steps.
  • Right-click on the "Microsoft Visual Studio .NET 2003" shortcut and select "Properties."
  • On the "Shortcut" tab, click "Advanced..."
  • Check the box that says "Run as administrator."
  • Click "OK" until you're out of the shortcut properties.


Change IIS Settings to Accommodate ASP.NET v1.1 Applications

This is the part I got hung up on. I kept getting strange errors when trying to open web applications under Microsoft Visual Studio .NET 2003, mostly it thinking that the virtual directory was a v1.0 application. To enable ASP.NET v1.1, you need to do the following:
  • Open Internet Information Services (IIS) Manager.
  • Highlight your local server. In the Features View, locate the IIS section and double-click "ISAPI and CGI Restrictions."
  • Right-click item "ASP.NET v1.1.4322" and click "Allow."
  • Highlight the virtual directory for your ASP.NET v1.1 application or the entire web site it's under.
  • Right-click on the highlighted item and choose "Advanced Settings..."
  • Under "Behavior", change the item "Application Pool" from "DefaultAppPool" to "ASP.NET 1.1."


At this point, you should be good to go.