0

I have an HttpHandler, registered it with this in system.webServer/handlers (And also in system.web/httpHandlers forr IIS6)

 <add name="AttachmentHandler" verb="*" path="Attachment.ashx" type="AttachmentHandler"/>

And it works, however, we want to change the extension to something else like "Attachment.get" so that we can filter out the .get extensions from having encryption run on them (as it's screwing up our downloads).

Whenever I change the extension to something other than aspx, ashx, or the usual suspects, I get a 404!

What am I forgetting?

CaffGeek
  • 21,856
  • 17
  • 100
  • 184

2 Answers2

2

I betcha anything you just need to register the mime/type extension with IIS. See: http://technet.microsoft.com/en-us/library/cc725608(v=ws.10).aspx

Actually on second thought - if IIS 7 check 'Request Filtering' and make sure you add the extension in the 'File Name Extensions' tab and set to allowed. That's what I was thinking of - just jumped the gun on the response.

Aaron Romine
  • 1,539
  • 1
  • 9
  • 8
0

aspx, ashx and asmx are already mapped ASP.NET ISAPI extension (Aspnet_isapi.dll). So you will have to register your new extension in IIS

Follow the steps shown on MSDN hot to configure handler extension http://msdn.microsoft.com/en-us/library/bb515343.aspx

HatSoft
  • 11,077
  • 3
  • 28
  • 43