如何在 vista 的 iis 7 上面配置 asp.net 1.1 开发环境

在 vista 上配置 asp.net 1.1,问题层出不穷。主要问题在于 vs 2003 比较依赖于 IIS.

参考:
http://www.cublog.cn/u/884/showart.php?id=261667
http://www.cnblogs.com/david-chan/archive/2007/07/13/817364.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
http://blogs.iis.net/bills/archive/2008/06/02/installing-asp-net-1-1-with-iis7-on-vista-and-windows-2008.aspx

安装步骤:

1. 必须安装 .net framework 1.1 sp1,否则会报错。
2. 打开 iis6 管理兼容性。(在程序与功能/windows功能里)
3. 注册 iis 脚本。
   用管理员权限打开 vs 03 的 console. 然后执行:
   aspnet_regiis.exe -ir -enable
   其中 -r 表示不改变现有脚本映射。
   -enable 是打开 "ISAPI 和 CGI 限制" 为 Allow. 这个也可以在 iis 里设置。
4. iis 管理器中,选择“计算机名”,"ISAPI和CGI限制”,确认 asp.net 1.1 是 Allow 状态。
5. 设置默认应用程序池为 1.1 的。
   (否则的话就要 vs 里建好网站再改应用程序池设置)

6. 最后一点最重要。在 1.1 的 machine.config 里加一个节处理器的配置如下:

<section name="system.webServer" type="System.Configuration.IgnoreSectionHandler,
    System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />

加在 </configSections> 结束前即可。
否则会报不能识别 <webServer> 的节。

machine.config 的位置在 %windir%\Microsoft.NET\Framework\v1.1.4322\config\machine.config

之后还发现一些 vs 03 不能调试的错误。记录如下:


---------------------------
Microsoft Development Environment
---------------------------
Error while trying to run project: Unable to start debugging on the web server. You do not have permission to debug the application. The URL for this project is in the Internet zone. Click Help for more information.
---------------------------
确定   帮助  
---------------------------

解决办法:在 IE 选项的安全设置里,将 http://localhost 加入本地站点(默认有一个 http://127.0.0.1,
其实是一样的,但是不知道为啥不能识别)。


---------------------------
Microsoft Development Environment
---------------------------
Error while trying to run project: Unable to start debugging on the web server. Debugging failed because integrated Windows authentication is not enabled. Click Help for more information.
---------------------------
确定   帮助  
---------------------------

解决办法:iis -> 选中站点 -> 身份验证
启用 "Windows 身份验证"







posted on 2008-08-08 09:03  NeilChen  阅读(1099)  评论(2编辑  收藏  举报

导航