HttpHandler for Virtual Directory
HttpHandler for Virtual Directory
HttpHandler for Virtual Directory
HttpHandler for Virtual Directory
HttpHandler for Virtual Directory
HttpHandler for Virtual Directory HttpHandler for Virtual Directory HttpHandler for Virtual Directory HttpHandler for Virtual Directory HttpHandler for Virtual Directory HttpHandler for Virtual Directory HttpHandler for Virtual Directory HttpHandler for Virtual Directory
HttpHandler for Virtual Directory HttpHandler for Virtual Directory
HttpHandler for Virtual Directory
Go Back  Xtreme Visual Basic Talk > > > HttpHandler for Virtual Directory


Reply
 
Thread Tools Display Modes
  #1  
Old 03-24-2012, 01:27 PM
holtzy holtzy is offline
Senior Contributor
 
Join Date: Jul 2002
Location: USA
Posts: 1,054
Talking HttpHandler for Virtual Directory


I am using a httphandler in my web.config for all pdf extensions. Works great. We recently moved some pdfs to a different location on the network. I have created a virtual directory inside the web site folder that points to this location. I use two different methods for accessing these pdfs. One method is to set the path for a control on the web page. This method still works and triggers the handler. The second method is to download the file using Response.WriteFile. It downloads the file, but never triggers my handler.

Note that the virtual directory is not an application. It just points to the new location using "a shared location on another computer".

Any ideas? Here is what is looks like in my web config:
Code:
<httpHandlers>			
	<add verb="*" path="*.pdf" type="MyFileHandler"/>      
</httpHandlers>
__________________
God is good!!!
Reply With Quote
  #2  
Old 03-25-2012, 01:56 PM
holtzy holtzy is offline
Senior Contributor
 
Join Date: Jul 2002
Location: USA
Posts: 1,054
Default

When I go directly to the pdf (i.e. https://mysite.com/sub1/sub2/virtualDirectory/myPdf.pdf) it triggers the handler. Is Response.WriteFile not supposed to trigger the handler? Is there anyway to hack this response.writefile glitch? If not, I might be ok anyway.
__________________
God is good!!!
Reply With Quote
Reply

Tags
httphandler, iis6, network share, virtual directory


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump

Advertisement:





Free Publications
The ASP.NET 2.0 Anthology
101 Essential Tips, Tricks & Hacks - Free 156 Page Preview. Learn the most practical features and best approaches for ASP.NET.
subscribe
Programmers Heaven C# School Book -Free 338 Page eBook
The Programmers Heaven C# School book covers the .NET framework and the C# language.
subscribe
Build Your Own ASP.NET 3.5 Web Site Using C# & VB, 3rd Edition - Free 219 Page Preview!
This comprehensive step-by-step guide will help get your database-driven ASP.NET web site up and running in no time..
subscribe
HttpHandler for Virtual Directory
HttpHandler for Virtual Directory
HttpHandler for Virtual Directory HttpHandler for Virtual Directory
HttpHandler for Virtual Directory
HttpHandler for Virtual Directory
HttpHandler for Virtual Directory HttpHandler for Virtual Directory HttpHandler for Virtual Directory HttpHandler for Virtual Directory HttpHandler for Virtual Directory HttpHandler for Virtual Directory HttpHandler for Virtual Directory
HttpHandler for Virtual Directory
HttpHandler for Virtual Directory
 
HttpHandler for Virtual Directory
HttpHandler for Virtual Directory
 
-->