使用 Visual Studio 2005 调试 .asp 页面
我正在将用经典 asp 制作的网站迁移到 asp.net,但 asp.net 开发服务器不处理 .asp 页面。
是否可以让它运行 .asp 页面? 也许是 .asp 的自定义 httphandler?
谢谢!
I'm migrating a website made in classic asp to asp.net, but the asp.net dev server doesn't handle .asp pages.
Is it possible to make it run .asp pages? Maybe a custom httphandler for .asp?
thanks!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(5)
您运行的是安装了 IIS 的 Winxp 吗? 如果是这样,我要做的就是:使用本地 IIS 在浏览器中打开 ASP 页面,然后在 VS 中将 ASP 页面所在的文件夹作为网站项目打开。 转到“调试”菜单,选择“附加到进程”,然后查找在 IWAM_MACHINENAME 用户下运行的 dllhost.exe 进程。 您还必须确保已设置虚拟目录以允许 ASP 服务器端调试。 附加到该进程后,您可以像往常一样设置断点等。
Are you running Winxp with IIS installed? If so, here's what I do: hit the asp pages in the browser using your local IIS, and then open the folder where the ASP pages reside as a website project in VS. Go to the Debug menu, choose Attach to Process, and then look for the dllhost.exe process that is running under the IWAM_MACHINENAME user. You also have to make sure the you have setup the virtual directory to allow ASP server-side debugging. After attaching to that process, you can set breakpoints, etc. as usual.
上次我必须调试 asp 页面时,我发现插入一堆 Response.Write() 更容易。 如果你找不到在 VS 中执行此操作的方法,那么这可能会有所帮助。
The last time I had to debug asp pages I found it was easier to insert a bunch of Response.Write()'s. If you cant find a way to do it in VS, then this may help.
不幸的是,您将不得不使用传统的(或神秘的!)方法在 VS2005 中调试您的 asp 页面(即alert()、response.write() 等)
Unfortunately you will have to use traditional (or arcane!) methods to debug your asp pages in VS2005 (i.e. alert(), response.write() etc.)
可能不是你想听到的,但是vs2005不支持这个。 它被重新添加到vs2008中。 也许免费的 vs2008 Express 版本之一可以帮助您摆脱这个困境?
Possibly not what you want to hear, but vs2005 doesn't support this. It was re-added into vs2008. Perhaps one of the free vs2008 express edtions might get you out of this hole?
除了 patmortech 提供的答案之外,我建议如果您正在测试混合技术站点,请附加到 aspnet_wp 进行调试应用程序的 .NET 部分。 如果您的应用程序使用第三方 ISAPI 过滤器,情况也是如此。
Cassini 服务器仅适用于纯 .NET。
In addition to the answer provided by patmortech I would recommend that if you are testing a mixed tech site you attach to aspnet_wp to debug the .NET portions of the app. This is also true if your app uses third-party ISAPI filters.
The Cassini server is good for pure .NET only.