Solved

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

Posted on 2008-10-17
2
602 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

Connect further...control easier

With the ATEN CE624, you can now enjoy a high-quality visual experience powered by HDBaseT technology and the convenience of a single Cat6 cable to transmit uncompressed video with zero latency and multi-streaming for dual-view applications where remote access is required.

Question has a verified solution.

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

Suggested Solutions

Introduction This article explores the design of a cache system that can improve the performance of a web site or web application.  The assumption is that the web site has many more “read” operations than “write” operations (this is commonly the ca…
International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
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…
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…

740 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