Set handler for PDF in IIS
问题 I developed an HttpHandler in order to count number of downloads for PDF files. Now the problem is: How can I make IIS use my handler for PDF files? 回答1: For IIS 7 it does depend on which mode you are running IIS in. Microsoft has a great tutorial on this How to: Register HTTP Handlers which goes over all the different configuration scenarios but assuming you are running IIS 7 in integrated mode and your handler is a compiled binary you would need a web.config entry similar to the following: