Question

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?

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):

  • 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; overflow: hidden; width: 500px; height: 423px;" src="http://localhost/barrows.kab?client=33ee472yaaM24a">
</form>
</body>

  • VS2005 running in attached mode to the INETINFO.EXE Process.
Was it helpful?

Solution

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

See here.

e.g.

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

OTHER TIPS

Go back to Application Mappings and make sure the checkbox for "Verify File Exists" is un-checked. This will make anything with .kab be handled by .NET.

Just one comment for the marked as correct answer; the type has to be specified the other way around, i.e. the handler first and then the assembly name (e.g.: type="My.Assembly.Handler, My.Assembly, ...")

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top