IIS Express 是否支持调试经典 ASP?
我最近安装了 Visual Studio 2010 SP1 BETA、ASP.NET MVC 3 RC2 和 IIS Express。
我成功地在使用 IIS Express 的项目中与经典 ASP 页面一起运行了一个 MVC 3 项目。
我想知道是否有一种方法可以在使用 IIS Express 时在 Visual Studio 中使用断点设置经典 ASP 调试?
如果是这样,是否有任何关于如何执行此操作的教程/帖子?
I recently installed Visual Studio 2010 SP1 BETA, ASP.NET MVC 3 RC2 and IIS Express.
I successfully got an MVC 3 project running along with classic ASP pages in the project with IIS Express.
I was wondering if there is a way to set up Classic ASP debugging with breakpoints in Visual Studio while using IIS Express?
If so, are there any tutorials / posts on how to do this?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
要在 IIS Express 中启用 ASP 调试:
1. 根据您的 Visual Studio 版本找到要更新的相应 applicationhost.config 文件。
(如果找不到 applicationhost.config,那是因为 Web 应用程序尚未在 IISExpress 中启动。所以请转到首次启动您的应用程序,然后将创建该文件。)
2. 在文本编辑器中打开 applicationhost.config 并更改
;
元素:开始调试:
设置断点:
请记住,如果您需要对此页面进行更改,请在原始源文件中进行更改,而不是在带有断点的版本中进行更改。当您保存这些更改时,文件将从 IIS Express 缓存中删除,因此您必须重复这些步骤才能再次设置断点。
有关更多详细信息,请参阅 Dixin 的博客。
To enable ASP debugging in IIS Express:
1. Locate the appropriate applicationhost.config file to update based on your version of Visual Studio.
(If you cannot find applicationhost.config, it is because the web app has not been launched in IISExpress yet. So go ahead and launch your app for the first time and then the file will be created.)
2. Open applicationhost.config in a text editor and change the
<system.webServer><asp>
element to:Start debugging:
To set breakpoints:
Keep in mind that if you need to make changes to this page, make them in the original source file, not the version with the breakpoints. And when you save those changes the file is removed from the IIS Express cache so you have to repeat these steps to set the breakpoints again.
For more details see Dixin's Blog.
令人惊讶的是,与 Cassini 不同,IIS Express 确实支持经典 ASP。
(我之前甚至没有听说过 IIS Express - 看起来是一种很有前途的方法,可以让开发人员的计算机运行站点的本地副本,而无需配置成熟的 IIS 的复杂性)。
请参阅 Scott Guthrie 的博客。
我还没有找到在经典 ASP 中设置断点等的方法。如果除了在 ASP DLL 中设置断点(这几乎毫无用处)之外以任何方式支持这一点,我会非常非常惊讶。
Surprisingly, IIS Express DOES support classic ASP, unlike Cassini.
(I hadn't even heard of IIS Express before now - looks like a promising way to get developer's machines running a local copy of the site without the complexity of configuring full-blown IIS).
See this blog from Scott Guthrie.
I have not found a way to set breakpoints, etc in classic ASP. I would be very, very surprised if this was supported in any way other than setting break points within the ASP DLL (which will be near useless).
另请参阅我回答的这个问题。
IIS Express 和 Classic ASP
调试经典 ASP 仍然有点碰运气,但它是可行的
see also this question to which I answered.
IIS Express and Classic ASP
It's still a little hit and miss debugging classic asp but it is doable
我发现做到这一点的唯一方法是遵循 Scott Guthrie 的博客,如 David Lively 的回答中所发布。将站点设置为允许 F5 或 Ctrl + F5 启动应用程序后。您需要安装 IIS 5/6/7 并将站点添加为根目录或虚拟目录。因此,您同时拥有 IIS Express 和 IIS Express。 IIS 完全成熟,指向同一物理目录。现在启动 IIS 实例。就我而言,我只是导航到本地主机。这将启动 w3wp.exe 现在在 VSS 中附加到进程 W3wp.exe。
除此之外。我不相信有一个真正的解决方案可以在 IIS Express 中调试 ASP classic。
The only way I have found to do this is to follow Scott Guthrie's blog as posted in David Lively's answer. Once you have the site set up to allow F5 or Ctrl + F5 start the app. You will need to have installed IIS 5/6/7 and add the site as either the root, or a virtual directory. So you have both IIS express & IIS full blown pointing to the same physical directory. Now fire up the IIS instance. In my case I just navigate to localhost. this will start w3wp.exe Now in VSS attach to process W3wp.exe.
Other than this. I don't believe there is a true solution to debugging ASP classic in IIS Express.