C# 调试HTTP处理程序
我在2003年使用IIS 6。我创建了一个从IHTTPassynchandler继承的HTTP处理程序dll。dll构建到inetpub\ww8080root\common\bin目录中。它旨在拦截所有请求 网站设置为监视端口8080。我在www8080root目录中创建了一个公共文件夹,并在II6中创建了一个指向它的虚拟目录。 我在公共目录中创建了一个web.config文件C# 调试HTTP处理程序,c#,debugging,iis,httphandler,C#,Debugging,Iis,Httphandler,我在2003年使用IIS 6。我创建了一个从IHTTPassynchandler继承的HTTP处理程序dll。dll构建到inetpub\ww8080root\common\bin目录中。它旨在拦截所有请求 网站设置为监视端口8080。我在www8080root目录中创建了一个公共文件夹,并在II6中创建了一个指向它的虚拟目录。 我在公共目录中创建了一个web.config文件 <?xml version="1.0" encoding="utf-8"?> <configurat
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<system.web>
<compilation debug="true" defaultLanguage="c#" />
<httpHandlers>
<add verb="*" path="*"
type="x2Handler.x2Handler, x2Handler" />
</httpHandlers>
</system.web>
</configuration>
我设置工具->选项->调试->仅启用我的代码
我将路径设置为要从中加载符号的公共/bin位置。任何手动设置的断点仍将显示:
The breakpoint will not currently be hit. No symbols have been loaded for this document.
编辑:
加载时,它似乎正在查找ntdll.pdb的符号。即使我手动加载httpHandler的符号文件,也没有什么区别。但是代码肯定正在执行。在异常发生之前添加
调试器.Break()
几行。这将给您一个弹出窗口,要求附加调试器。在异常发生之前添加debugger.Break()
几行。这将给您一个弹出窗口,要求附加调试器。问题是.Net安装在IIS版本之前。我注意到“编辑配置”按钮被禁用,并找到了这个网站。
按照说明:
You will need to go to Start -> Microsoft Visual Studio 2005 -> Visual Studio Tools -> Visual Studio 2005 Command Prompt. On the prompt write down this command:
aspnet_regiis -r
The above command will register dot net with IIS and now the button will also be enabled.
通过这样做,它修复了调试问题 问题在于.Net安装在IIS版本之前。我注意到“编辑配置”按钮被禁用,并找到了这个网站。 按照说明:
You will need to go to Start -> Microsoft Visual Studio 2005 -> Visual Studio Tools -> Visual Studio 2005 Command Prompt. On the prompt write down this command:
aspnet_regiis -r
The above command will register dot net with IIS and now the button will also be enabled.
通过这样做,它修复了调试问题 谢谢你的帮助。它按你说的做了,但我仍然无法调试。谢谢你的帮助。它按你说的那样做了,但我仍然无法调试。它所指的符号是一个符号数据库,它是在visual studio中以“调试”配置构建应用程序时创建的。文件扩展名为.pdb,请确保调试器可以使用该扩展名。它所引用的符号是在visual studio中以“调试”配置构建应用程序时创建的符号数据库。文件扩展名为.pdb,请确保调试器可以使用该扩展名。