每当我在VS2008中运行网站时尝试打开经典的asp页面时,我都会收到错误消息:“此类页面未提供”。
如何在Visual Studio 2008中调试/运行经典asp页面?
AnthonyWJones有正确的答案但是由于某种原因我不能让我选择答案 Here is a tutorial I found that goes into more details how to set up VS2008 and XP to debug classic asp
答案 0 :(得分:13)
Developer Web Server(Cassini)仅支持ASP.NET和静态内容。
您需要在您的开发计算机上运行IIS实例。
Windows XP
在XP上,您需要修改默认网站,以使其主目录指向您的网站根文件夹,或创建新的虚拟目录并将其配置为应用程序。在任何一种情况下,您都希望将应用程序隔离设置为“高”
使用浏览器直接点击您的网站,然后在VS 2008中使用Debug-> Attach to Process。您需要附加到名为“DLLHOST.EXE”的进程。将有多个,但很可能只有一个将在Type列中包含单词“Script”,那就是你想要的那个。确保进程列表上方的“附加到”框包含“脚本”。
Vista / Windows 7
Vista和Windows 7将使用IIS7,这将允许您创建一个新网站,如果这是您的偏好。确保应用程序具有自己的应用程序池。
除了您正在寻找W3WP.exe进程之外,该过程大致相同。如果有多个在类型中显示“脚本”,您可以将其附加到所有类型。
有了这个,您可以设置断点,检查异常,并完成脚本调试所能做的所有常规工作。
答案 1 :(得分:3)
使用IIS作为服务器,使用Response.Write进行调试。我们这样做的方式“回到了当天”;)
答案 2 :(得分:1)
Assuming you are running Windows XP with IIS installed and VS 2008 with the default settings pref "General Developer Settings" you need to enable ASP debugging in IIS: Open Internet Information Server management console Right click the "Default Web Site" Left click "Properties" Select the "Home Directory" tab Left Click the "Configuration" button Select the "Debugging" tab Check both fags in the Debugging Flags section Click Ok on all the dialogs until you are back to the management console Close the management console You now need to set permissions, you need to ensure that the IWAM user and the IIS authenticated user have read access to the ASP file you want to debug. I find working as an administrator helps with permissions. Note permissions will probably be your biggest hurdle. Now you need to edit your ASP page and place the word "Stop" in the code just before where you want to debug, Note: you require to be logged into the Console session in windows if you are using Remote Desktop. Browse to the page in question and you shout be prompted to debug, you will then choose what debugger you want to use, select VS2008, now you are debugging Classic ASP. Note: This is from memory so if you have any trouble let me know, also VS2005 is better for debugging Classic ASP. I don't know if the Express editions will work with those instructions. All asp pages have to be hosted in IIS.
答案 3 :(得分:-2)
就像AnthonyWJones所说,你无法在Visual Studio开发服务器中调试非ASP.Net代码。
但是,如果您的计算机上安装了IIS 6.0,则可以使用Microsoft脚本调试程序,它可能已经安装在您的计算机中(我的)。
在这里,您可以了解如何启用IIS 6.0进行调试: http://www.microsoft.com/technet/prodtechnol/WindowsServer2003/Library/IIS/3c7830b4-df5c-41a2-9890-c201eb774c89.mspx?mfr=true