znsoft
管理员
管理员
  • 注册日期2001-03-23
  • 最后登录2023-10-25
  • 粉丝300
  • 关注6
  • 积分910分
  • 威望14796点
  • 贡献值7点
  • 好评度2410点
  • 原创分5分
  • 专家分100分
  • 社区居民
  • 最爱沙发
  • 社区明星
阅读:3090回复:0

在vista 下使用 vc2003

楼主#
更多 发布于:2009-05-20 22:27
How to use Visual Studio 2003 in Windows Vista
  • 1/17/2008
  • Author: Michael Wick
  • Category: Applications
  • 5100 Views
  • 1 Comments

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).






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”.





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.





·          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”.





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”.



                                                 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.





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...".





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





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.





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





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.



 
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.
 
http://www.zndev.com 免费源码交换网 ----------------------------- 软件创造价值,驱动提供力量! 淡泊以明志,宁静以致远。 ---------------------------------- 勤用搜索,多查资料,先搜再问。
游客

返回顶部