Intercepting requests for files living in a virtual directory in IIS 6

Gunslinger08

Lifer
Nov 18, 2001
13,234
2
81
I need to write an application in .NET that can handle requests for various documents in a virtual directory hosted in IIS 6. Can anyone point me in the right direction?
 

bsobel

Moderator Emeritus<br>Elite Member
Dec 9, 2001
13,346
0
0
From the description it sounds like you need to implement a pipeline handler. This is a good overview.. If you can, more details would be helpful...
 

Gunslinger08

Lifer
Nov 18, 2001
13,234
2
81
Originally posted by: bsobel
From the description it sounds like you need to implement a pipeline handler. This is a good overview.. If you can, more details would be helpful...

This is intended for use with Microsoft Content Management Server. With MCMS, resources (pdfs, docs, ppts, etc.) are stored in a database, but can be referenced via a URL because of a custom ISAPI filter that it installs. I need to add the ability to protect these documents for viewing only by specific users.
 

Snapster

Diamond Member
Oct 14, 2001
3,916
0
0
Sounds like you need to write a HTTP handler (IHttpHandler) inside of which you check the user is authenticated (by your chosen method), if so you write the file out to the browser. There are some examples of it's use in bsobel's link or if you need more info just drop in what you need.