Solved

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

Posted on 2008-10-17
2
603 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
How to use 2 separate DNS names. 5 50
asp.net repeater server posting 5 35
How does this modal work? 3 29
How do you think this website does searches? 5 30
As a financial services provider, your business is impacted by two of the strictest federal regulations on record: the Sarbanes-Oxley Act and the Gramm-Leach-Bliley Act. Correctly implementing faxing into your organization to provide secure, real-ti…
Lease-to-own eliminates the expenditure of hardware replacement and allows you to pay off the server over time. Usually, this is much cheaper than leasing servers. Think of lease-to-own as credit without interest.
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, f…

738 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