views:

70

answers:

3

We have a .net 3.5 Web Application Project. It has a custom http handler defined inside a .cs class. There is also a corresponding web.config entry for the handler and the corresponding module. However, when the application is published, the handler is not being hit - I verified it through attaching VS debugger to the w3wp.exe process, and setting breakpoints in several places. Some where hit, but the http handler weren't. The handler works perfectly fine when the application is run from VS using cassini. What's happening here?

Edits: IIS used is v6.0. I tried adding a new filetype to IIS based on Ken Pespisa's susggestion, the handler is still not working. The extension of the handler is .cs. It is inside a c# code file. I thought the section in the web.config would take care of mapping file types, etc... In addition to mapping, I also needed to select "Script Engine" and deselect "Verify that file exists".

Thanks!

A: 

Sound like you forgot to set the filetype to be handled by asp.net

Carl Bergquist
A: 

Which version of IIS are you using? Cassini isn't a good test, it routes everything through ASP.NET.

IIS6 does not do this, unless you add a wildcard mapping, and IIS7 will do it by default, unless you're in the compatibility app pool.

If you are on IIS6, and that's likely, then take a look at the answer I gave to Jon Skeet's question (oh yes, he asks too)

blowdart
A: 

You'll need to configure IIS to send requests for your handler's file type to ASP.NET. More information here: http://msdn.microsoft.com/en-us/library/bb515343.aspx

Ken Pespisa