Solved

Http Handler not working to retireve .pdf documents from a virtual directory

Posted on 2008-10-17
2
593 Views
Last Modified: 2013-11-22
I've created a website in asp.net, framework 2.0 using VS2005.  I've got an .aspx page with hyperlinks that map down to a virutal directory on the website to show .pdf documents when a user clicks on the links.  When I create the link to the .pdf files, I swap out part of the path with a session id so that no one can grap that URL and email it to someone else.  When a user clicks on the link my HTTP Handler swaps out the session id with the correct path to the file.  This all works on my development machine but when I deploy it to a server I get the Http error 404.  I believe my http handler is not firing on the test machine.   On the virutal server properties I configured a windows account to connect  as that account.  I left anonymous checked with the default account, IUSR.  Is there something that I'm missing?  Sorry for the long explanation, and if this has already been posted.  This has to be a configuration setting I'm missing or that the http hander is not registered correctly.  

Here is my http handler on my config file,
<add verb="GET" path="*.pdf" type="Glidewell.Handler.ResourceHandler, Glidewell.Handler"/>.

Thanks.
0
Comment
Question by:GLlano
2 Comments
 
LVL 13

Expert Comment

by:crazyman
ID: 22742938
0
 

Accepted Solution

by:
GLlano earned 0 total points
ID: 22798853
I found the solution.  The issue was that the website tries first to check if the file exists before it tries to excute the hander for the pdf file.  You need to perform the following steps to take this off from
checking.
1.) Go into IIS
2.) Right mouse click on your website, go to properties.
3.) Go to the Home directory tab.
4.) Click on the Configuration button.
5.) Look for the .pdf file extension and click on the Edit button.
6.) Uncheck the  Check if file exists checkbox button.
7.) Click on Ok to exit the screens.
0

Featured Post

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Article by: kevp75
Hey folks, 'bout time for me to come around with a little tip. Thanks to IIS 7.5 Extensions and Microsoft (well... really Windows 8, and IIS 8 I guess...), we can now prime our Application Pools, when IIS starts. Now, though it would be nice t…
With the withdrawal of support for Windows Server 2003 this summer, many clients face the issue of moving away from their 2003 installs. There are a few options out there that many people/companies are selling. But the clients I have, haven't wanted…
Sending a Secure fax is easy with eFax Corporate (http://www.enterprise.efax.com). First, Just open a new email message.  In the To field, type your recipient's fax number @efaxsend.com. You can even send a secure international fax — just include t…
Internet Business Fax to Email Made Easy - With eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…

760 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

23 Experts available now in Live!

Get 1:1 Help Now