Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP .Net Security > How to authorize download?

Reply
Thread Tools

How to authorize download?

 
 
lenyado
Guest
Posts: n/a
 
      12-25-2004
I am planning a website which reqires this feature: it allows registered
users to upload and/or download files (like *.doc, *.ppt etc.) but not
everyone can download every files. some files are restricted to certain users
only. that means only certain users can download certain files. but if the
URL of a certain file that needed to be protected is exposed, the
authorization will be in vain. any solutions?
 
Reply With Quote
 
 
 
 
Ben Lucas
Guest
Posts: n/a
 
      12-27-2004
You could write an HttpHandler or an HttpModule to handle the security.
Basically your HttpHandler or HttpModule would need to perform the security
check and give an Access Denied message if the user does not have access, or
if the user does have access, set the content type and write the file to the
Response stream.

Also, note that you will have to set up IIS so that the ASP.Net application
handles .doc, .ppt, and whatever other files you want to provide security
for.

--
Ben Lucas
Lead Developer
Solien Technology, Inc.
www.solien.com

"lenyado" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
>I am planning a website which reqires this feature: it allows registered
> users to upload and/or download files (like *.doc, *.ppt etc.) but not
> everyone can download every files. some files are restricted to certain
> users
> only. that means only certain users can download certain files. but if the
> URL of a certain file that needed to be protected is exposed, the
> authorization will be in vain. any solutions?



 
Reply With Quote
 
 
 
 
Daniel Fisher\(lennybacon\)
Guest
Posts: n/a
 
      12-28-2004
Write the files based on a querystringvariable as binary to the response
stream (if the user is authenticated, otherwise send him some greetings with
a errormessage) - so you don't have to reconfigure IIS and nobody has knows
the path to the files.

--
Daniel Fisher(lennybacon)
MCP ASP.NET C#
Blog: http://www.lennybacon.com/


"Ben Lucas" <(E-Mail Removed)> wrote in message
news(E-Mail Removed)...
> You could write an HttpHandler or an HttpModule to handle the security.
> Basically your HttpHandler or HttpModule would need to perform the
> security check and give an Access Denied message if the user does not have
> access, or if the user does have access, set the content type and write
> the file to the Response stream.
>
> Also, note that you will have to set up IIS so that the ASP.Net
> application handles .doc, .ppt, and whatever other files you want to
> provide security for.
>
> --
> Ben Lucas
> Lead Developer
> Solien Technology, Inc.
> www.solien.com
>
> "lenyado" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
>>I am planning a website which reqires this feature: it allows registered
>> users to upload and/or download files (like *.doc, *.ppt etc.) but not
>> everyone can download every files. some files are restricted to certain
>> users
>> only. that means only certain users can download certain files. but if
>> the
>> URL of a certain file that needed to be protected is exposed, the
>> authorization will be in vain. any solutions?

>
>



 
Reply With Quote
 
Patrick Olurotimi Ige
Guest
Posts: n/a
 
      12-28-2004
Try looking at these 2 artickes at:-
http://dotnetjunkies.com/WebLog/rich...04/05/21/14215.
aspx

and

http://www.microsoft.com/india/msdn/articles/57.aspx

Hope it helps..
Patrick



*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
 
Reply With Quote
 
Lenyado
Guest
Posts: n/a
 
      12-29-2004
Thanks, that's quite helpful. i will try that out later.
 
Reply With Quote
 
 
 
Reply

Thread Tools

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 On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Re: How include a large array? Edward A. Falk C Programming 1 04-04-2013 08:07 PM
Problem with Authorize.net Blue ASP .Net 3 12-30-2005 04:20 PM
Authorize before download a file in asp.net Ben Chen ASP .Net 1 10-11-2004 11:03 AM
Authorize HTTPHeader =?Utf-8?B?QmlsbCBCZWxsaXZlYXU=?= ASP .Net 2 12-15-2003 04:31 PM
Re: how to get from asp.net to asp? Authorize.net Jordan Marton ASP .Net 1 08-14-2003 03:58 PM



Advertisments