C#,调试HTTPHandler [英] C#, Debugging an HTTPHandler

查看:197
本文介绍了C#,调试HTTPHandler的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个HTTP处理程序,它是我们应用程序90%的入口。基本上,它会收到请求,处理大量数据,并根据客户端和客户端返回非常特定的文件。嵌入的网页等。我已经设置了应用程序映射,以便所有 .kab 扩展名都指向 C:\Windows ... \ aspnet_isapi.dll 。我将HttpHandler DLL添加到我的网站的BIN目录中。当我尝试浏览到测试页面时,iFrame会显示404。我在HttpHandler的设置中是否错过了某些东西?

I have an HTTP Handler that is the entry point for 90% of our app. Basically it gets a request, process a lot of data and returns a very specific file depending on the client & web page it is embedded on, etc. I have setup the Application Mappings so that all .kab extensions point to C:\Windows...\aspnet_isapi.dll. I added my HttpHandler DLL to the BIN directory for my website. When I try to browse to the test page the iFrame displays a 404. Did I miss something in my setup of the HttpHandler?

到目前为止在调试代码时,我尝试进行附加,但是在页面上不断出现404错误,并且永远不会进入我的代码。 在调试模式下绑定到项目的最佳实践方法是什么?

As far as debugging my code, I’ve tried attaching but I keep getting a 404 error on the page and it never steps into my code. What is the best practice method for tying into the project in debug mode?

基本设置测试(全部本地在一台计算机上):

Basic setup for test (all local on one machine):


  • Windows XP Pro上的IIS 5.1 –运行普通的Jane default.aspx:

  • IIS 5.1 on Windows XP Pro – running a plain Jane default.aspx:

< body>

< form id = form1 runat = server>

< iframe style = border-width:2px; z-index:
100;溢出:隐藏;宽度:500px;
高度:423像素;
src = http://localhost/barrows.kab?client = 33ee472yaaM24a>

< / form>
< / body>

<body>
<form id="form1" runat="server">
<iframe style="border-width: 2px; z-index: 100; overflow: hidden; width: 500px; height: 423px;" src="http://localhost/barrows.kab?client=33ee472yaaM24a">
</form>
</body>




  • VS2005以附加模式运行到INETINFO.EXE进程的

  • 推荐答案

    您还需要将.cab扩展名映射到web.config文件中的处理程序类。

    You also need to map .cab extension to your handler class in the web.config file.

    请参见此处

    例如

    <httpHandlers>
     <add verb="*" path="*.cab"
       type="My.Assembly,My.Assembly.Handler, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=whatever" 
       validate="false"/>
    ....
    

    这篇关于C#,调试HTTPHandler的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆