Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

I am trying to map a custom HTTP handler for *.pptx files and for some reason this is not working.

My HTTP handler does nothing else other than sending an email when a powerpoint file is accessed. I have checked the code with other extensions (*.txt, *.pdf etc) and they work without any issues. I have the same problem for *.docx, *.xlsx extensions.

I have checked HTTPhandler and handlers (System.WebServer) sections and they have correct entries.

HTTP Handler

<add verb="*" path="*.txt,*.pptx" validate="true" type="DownloadsAudit.Auditor,DownloadsAudit, Version=1.0.0.0, Culture=neutral,PublicKeyToken=879e70535c0e166f" />

Handlers

<add name="PPT" path="*.pptx" verb="*" modules="IsapiModule" scriptProcessor="%windir%\Microsoft.NET\Framework\v2.0.50727\aspnet_isapi.dll" resourceType="File" /> 

This is for a MOSS 2007 application runing on IIS7. Is this a known issue? Am I missing someting?

share|improve this question
    
What exactly is it doing? Is there an error? Does it just not respond? And why use an HTTPHandler rather than an HTTPModule? –  Andy Burns Jul 16 '12 at 9:30
    
Nothing happens when I access a pptx file. I get email if I access a txt file. I did not want HTTP module because I just want to track pptx extension. –  Shoban Jul 16 '12 at 9:34
    
I have error handling, tried debugging and the code never gets hit when a pptx file is accessed. –  Shoban Jul 16 '12 at 9:35
    
just to ensure the code is getting called try changing the path attribute to path="*.jpg" –  AbrahamJP Jul 19 '12 at 7:50
    
One thing I came to notice while using fiddler is that, a PPTX request is not straight away directed to the file, instead it is requested through a download.aspx page. following is the url I came to get from fiddler when requesting a PPT file http://<SERVERNAME>/Docs/_layouts/download.aspx?SourceUrl=%2FDocs%2FTest%2Ftest%‌​2Eppt&Source=http%3A%2F%2Fsp2007%2FDocs%2FTest%2FForms%2FAllItems%2Easpx&FldUrl= –  AbrahamJP Jul 19 '12 at 8:41
add comment

1 Answer

Dop you need the preCondition attribute specifying in the IIS7 handler element? Otherwise it only works in Integrated pipeline and you are using Classic since it is MOSS...

share|improve this answer
    
I used this for registering the handler in classic mode. msdn.microsoft.com/en-us/library/46c5ddfy.aspx –  Shoban Jul 16 '12 at 11:02
    
Thanks. Let me check. –  Shoban Jul 16 '12 at 11:13
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.