How to use Visual Studio 2003 in Windows Vista

Thursday, January 17, 2008

This blog entry is intended to illustrate the steps necessary to set up a Windows Vista machine to use Visual Studio 2003 (.NET 1.1).  Most of the information was obtained from the following blogs:

http://citruslime.blogspot.com/2007/04/visual-studio-2003-web-debugging-on.html

http://blogs.iis.net/brian-murphy-booth/archive/2007/03/09/how-to-setup-asp-net-v1-1-visual-studio-net-2003-projects-on-iis7-vista.aspx

 

Steps

1.        Setup your user account as a local admin on the Vista machine and switch off the "user account control”.

a.        Open Control Panel -> User Accounts.

b.       Select “Change your account type”.

c.        Select “Administrator” (if not already Administrator).

1c.jpg

d.       Press “Change Account Type”.

e.       Select “Turn User Account Control on or off”.

f.         Uncheck “Use User Account Control (UAC) to help protect your computer”.

1f.jpg

g.        Press “OK”.

2.        Ensure your user account is included in the Debugger User group.

a.        Note: It appears this is not possible in certain versions of Vista, such as Home Premium.  Click the following link for more information:   http://windowshelp.microsoft.com/Windows/en-US/Help/0faddcfc-e2a9-4297-a429-3f7e83fe6e361033.mspx .

3.        Ensure that .NET 1.1 **SP1** is properly installed.

·          Vista does not include .NET v1.1 by default.

·          Because .NET 1.1 is not included by default, .NET v1.1 *SP1* is also not included.

·          Without SP1, W3WP.exe will crash when running an appPool under v1.1 due to DEP

·          To check this, make sure that "c:\Windows\Microsoft.NET\Framework\v1.1.4322\mscorsvr.dll" is version "1.1.4322.2032" or higher.

3.jpg

·          Unless you are 100% sure that SP1 for .NET is installed, you *really* should double-check this.

·          If you need to install .NET 1.1 SP1, you can download the upgrade here: http://www.microsoft.com/downloads/details.aspx?familyid=A8F5654F-088E-40B2-BBDB-A83353618B38&displaylang=en.

4.        Enable IIS 6.0 compatiblity.

a.        Open "Control Panel".

b.       Double-click "Programs and Features".

c.        Expand "Internet Information Services".

d.       Click on “Turn Windows Features On and Off”.

e.       Expand "Web Management Tools".

f.         Check “IIS 6 Management Compatibility”.

4f.jpg

5.        Enable ASP.NET Application Development Features, if not already done so.

a.        Open "Control Panel".

b.       Double-click "Programs and Features".

c.        Expand "Internet Information Services".

d.       Click on “Turn Windows Features On and Off”.

e.       Expand “World Wide Web Services”.

f.         Expand “Application Development Features”.

g.        Check “ASP.NET”.

5g.jpg

                                                  Note:   “.NET Extensibility”, “ISAPI Extensions”, and “ISAPI Filters” are dependencies, so they become automatically checked.

6.        Register v1.1 with IIS.

a.        Open a CMD prompt.

b.       Change your directory to c:\Windows\MIcrosoft.net\Framework\v1.1.4322.

c.        Run "aspnet_regiis -ir -enable".

·    "ir" registers v1.1 with IIS but doesn't change any existing script mappings.

·    "enable" marks aspnet_isapi.dll as "Allowed" under "ISAPI and CGI Restrictions".

·    aspnet_regiis should also create a new AppPool under "Application Pools" called "ASP.NET 1.1" that is configured with the "Classic" pipline, and "Enable32BitAppOnWin64" set to true if a 64-bit OS.

6c.jpg

7.        Make the new "ASP.NET 1.1" appPool the default.

a.        Open the IIS manager.

b.       Select the "Web Sites" folder.

c.        Under "Actions" on the upper right, click "Set Web Site Defaults...".

7c.jpg

d.       Change the "Application Pool" setting to "ASP.NET 1.1".

7d.jpg

8.        **Alternative step to 7** - Change the AppPool to "ASP.NET 1.1" after creating the ASP.NET project instead of making it the default

a.        Create the v1.1 ASP.NET project via Visual Studio. Attempting to run the project at this point will fail if the 1.1 appPool is not the default.

b.       Open the IIS manager.

c.        Right-click the newly create application directory and choose "Advanced Settings".

d.       Change the "Application Pool" to "ASP.NET 1.1".

e.       Go back to Visual Studio and attempt to run/debug project.

9.        Adjust ISAPI and CGI restrictions in IIS.

a.        Go into IIS 7.0 manager and select your server.

b.       Select ISAPI and CGI restrictions.

9b.jpg

c.        Ensure ASP v1.1 has the restriction set to Allowed.

9c.jpg

10.    Launch Visual Studio 2003 as Administrator.

11.    Create a simple web application with some event handling to test debugging (a button that displays text in a label control is what I used to test).

12.    Attach to the w3wp.exe process.

12.jpg

 

13.    Set breakpoints where appropriate.

14.    Launch the website in a browser (eg. http://localhost/YourWebApp/YourPage.aspx ).

15.    Ensure your breakpoints are being hit.

16.    That’s it!  Happy coding.

 

Comments

Chris
1/8/2010

Great tutorial but one thing, Step 7A. For those who don't know how to open ISS Manager, it would be good to show how to open it.

Reply

Good blog.

Reply

Good blog.

Reply
shep
7/20/2009

Thank You!

Reply
anuradha
10/6/2008

Excellent blog.It really helped me.

Reply
Leave Comment
Yay! You've decided to leave a comment. That's fantastic! Please keep in mind that comments are moderated. So, please do not use a spammy keyword or a domain as your name, or it will be deleted. Let's have a personal and meaningful conversation instead. Thanks for dropping by!