Re: Best Practices for File Access
From: Steve C. Orr [MVP, MCSD] (Steve_at_Orr.net)
Date: 03/09/04
- Next message: bruce barker: "Re: render blocks"
- Previous message: Yama: "Dynamically ADD HTMLAnchor"
- In reply to: DavidElliott_at_nospam.BellSouth.net: "Best Practices for File Access"
- Messages sorted by: [ date ] [ thread ]
Date: Mon, 8 Mar 2004 16:26:48 -0800
If you store your files in SQL Server then you can let it handle most of
these details.
Here's further information on that techique:
http://www.aspnetpro.com/features/2003/07/asp200307so_f/asp200307so_f.asp
Otherwise you'll probably store your restricted files in a private folder
and use Response.Writefile once you've determined the user is authorized:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpref/html/frlrfsystemwebhttpresponseclasswritefiletopic.asp
To find out if a file exists you can use the System.IO.File.Exists method.
Here's more info:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpref/html/frlrfsystemiofilememberstopic.asp
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpguide/html/cpconreadingwritingtofiles.asp
-- I hope this helps, Steve C. Orr, MCSD, MVP http://Steve.Orr.net <DavidElliott@nospam.BellSouth.net> wrote in message news:300q409gesdqq651jcfehjnmd7v055paei@4ax.com... > I am trying to do File Access for an ASP.NET project and am having some > difficulty. I was wondering if a document on Best Practice for File Access exists > somewhere. > > Scenerios I am looking to solve. > > 1) Attach an XML file to a WebControl TreeView > 2) Anonymous access for pictures > a) That exist in the virtual directory > b) Exist on another disk partition > 3) Restricted access for read/write based on person or group > > I am aware of authorization and authenication and know how to implement > them. > > If there are some examples or documents on how to do this properly, > (i.e. NO Hacks), I would most interested. > > Thanks, > Dave > > DavidElliott@BellSouth.net
- Next message: bruce barker: "Re: render blocks"
- Previous message: Yama: "Dynamically ADD HTMLAnchor"
- In reply to: DavidElliott_at_nospam.BellSouth.net: "Best Practices for File Access"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|