Click here to Skip to main content
15,888,461 members
Home / Discussions / ASP.NET
   

ASP.NET

 
AnswerRe: Protect my pdf documents [modified] Pin
Jesse Squire2-Jul-06 3:07
Jesse Squire2-Jul-06 3:07 
GeneralRe: Protect my pdf documents Pin
minhpc_bk2-Jul-06 15:40
minhpc_bk2-Jul-06 15:40 
GeneralRe: Protect my pdf documents Pin
Jesse Squire3-Jul-06 3:08
Jesse Squire3-Jul-06 3:08 
GeneralRe: Protect my pdf documents Pin
minhpc_bk3-Jul-06 19:55
minhpc_bk3-Jul-06 19:55 
GeneralRe: Protect my pdf documents Pin
Tech4U2-Jul-06 18:58
Tech4U2-Jul-06 18:58 
GeneralRe: Protect my pdf documents Pin
Jesse Squire3-Jul-06 2:53
Jesse Squire3-Jul-06 2:53 
GeneralRe: Protect my pdf documents Pin
harinath20-Jul-06 0:17
professionalharinath20-Jul-06 0:17 
GeneralRe: Protect my pdf documents Pin
Jesse Squire21-Jul-06 2:34
Jesse Squire21-Jul-06 2:34 
Technically, I believe it would work. However, I wouldn't advocate it as written for heavy use with large files. The drawback to my code is that the files being passed through the HttpHandler are being read into memory then dumped to the response buffer.

For your purposes, I spend a bit more time looking into securing that directory. You're not the first person to tackle this, so I'd have to imagine that sifting through Google may yield some gems.

If you were interested in experimenting a bit, you could try more of a streaming approach to the HttpHandler. You could use the same basic method, but instead of reading the entire file, use a binary reader to get a chunk of bytes, pass it to the response string, flush the response buffer, and repeat until done. That should lower the memory footprint [may also impact the speed a bit]. The disclaimer here is that I'm throwing an idea off the top of my head. I haven't tried it, but it may be worth some experimentation. If you do decide to go this route, please check in and let me know the results.

Best of luck. Smile | :)

--Jesse
GeneralRe: Protect my pdf documents Pin
harinath23-Jul-06 19:29
professionalharinath23-Jul-06 19:29 
Questionmouseover event on datalist. Pin
Amit Agarrwal30-Jun-06 23:53
Amit Agarrwal30-Jun-06 23:53 
Questionserver error when hosted on INTERNET Pin
nishak30-Jun-06 20:42
nishak30-Jun-06 20:42 
QuestionAccessing Web Control in JavaScript Pin
venkatasivaramaprasad30-Jun-06 20:34
venkatasivaramaprasad30-Jun-06 20:34 
AnswerRe: Accessing Web Control in JavaScript Pin
Uma Kameswari1-Jul-06 1:32
Uma Kameswari1-Jul-06 1:32 
GeneralRe: Accessing Web Control in JavaScript Pin
venkatasivaramaprasad2-Jul-06 18:55
venkatasivaramaprasad2-Jul-06 18:55 
AnswerRe: Accessing Web Control in JavaScript Pin
Guffa1-Jul-06 3:51
Guffa1-Jul-06 3:51 
AnswerRe: Accessing Web Control in JavaScript Pin
RichardGrimmer4-Jul-06 3:04
RichardGrimmer4-Jul-06 3:04 
Questionsearch query not working Pin
Amit Agarrwal30-Jun-06 20:24
Amit Agarrwal30-Jun-06 20:24 
AnswerRe: search query not working Pin
venkatasivaramaprasad30-Jun-06 21:14
venkatasivaramaprasad30-Jun-06 21:14 
GeneralRe: search query not working Pin
Amit Agarrwal30-Jun-06 21:26
Amit Agarrwal30-Jun-06 21:26 
GeneralRe: search query not working Pin
sriramaprasad3-Jul-06 2:47
sriramaprasad3-Jul-06 2:47 
QuestionWindows Service in ASP.NET Pin
aaraaayen30-Jun-06 18:45
aaraaayen30-Jun-06 18:45 
AnswerRe: Windows Service in ASP.NET Pin
RichardGrimmer4-Jul-06 3:07
RichardGrimmer4-Jul-06 3:07 
QuestionSession Terminate abnormaly [modified] Pin
Masood Ahmed30-Jun-06 17:07
Masood Ahmed30-Jun-06 17:07 
QuestionExtend Atlas [modified] Pin
YossiKahlon30-Jun-06 13:12
YossiKahlon30-Jun-06 13:12 
AnswerRe: Extend Atlas Pin
minhpc_bk30-Jun-06 17:37
minhpc_bk30-Jun-06 17:37 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.