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.