Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsGeneralPHPASPPerlColdFusionFlashHTML, CSS, ScriptsBrowsers

Webmaster Forum / Browsers / Internet Explorer / October 2005



Tip: Looking for answers? Try searching our database.

limiting access to files with asp.net

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Daniel - 15 Oct 2005 02:08 GMT
limiting access to files with asp.net

is there any way i can make a file only accessible to certain users of my
website? my files are to large to copy to a temp directory and they are of
many types, .exe .xsl .xml etc. i want an href to each file but only allow
users who have the right login-info in their session variable to get to the
files in their directory. is there something built into .net for doing this?
do i need to do some kind of isapi filter and then stream them?
Patrice - 20 Oct 2005 09:36 GMT
You could map all those extensions to the ASP.NET DLL :
http://support.microsoft.com/kb/893662/en-us

Another option would be to store those files outside of the dir and stream
them to the browser using a page (that can perform this check) :
http://support.microsoft.com/default.aspx?scid=kb;en-us;q307603 (but with a
file that is not under stored under the web site).

Signature

Patrice

> limiting access to files with asp.net
>
[quoted text clipped - 4 lines]
> files in their directory. is there something built into .net for doing this?
> do i need to do some kind of isapi filter and then stream them?
Bob Barrows [MVP] - 20 Oct 2005 14:53 GMT
> limiting access to files with asp.net
>
[quoted text clipped - 5 lines]
> something built into .net for doing this? do i need to do some kind
> of isapi filter and then stream them?

You can limit access to a folder by using settings in web.config. Look for
the <authorization> element in your web.config file and look it up in online
help (if using VS), or at msdn.microsoft.com/library

You will get better response to your questions by posting in the appropriate
newsgroup. In this case:
microsoft.public.dotnet.framework.aspnet

Bob Barrows
Signature

Microsoft MVP -- ASP/ASP.NET
Please reply to the newsgroup. The email account listed in my From
header is my spam trap, so I don't check it very often. You will get a
quicker response by posting to the newsgroup.

 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.