Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > Getting file permissions

Reply
Thread Tools

Getting file permissions

 
 
kratc
Guest
Posts: n/a
 
      07-23-2007
Hello.

I've been wondering for quite a while now if this even is without trying to open the file or something like that?

I'm trying to list all the files in a directory (with subdirectories) to which the logged in user has permissions. I'm using forms authentication and the permissions are specified in web.config files. Everything's fine as long as the listing of files goes, but I would only like to show the files to the user to which the user has permissions.

Does anyone know how to do this? Thanks alot..
 
Reply With Quote
 
 
 
 
Mark Rae [MVP]
Guest
Posts: n/a
 
      07-23-2007
"kratc" wrote in message news:...

> I'm trying to list all the files in a directory (with subdirectories) to
> which the logged in user has
> permissions. I'm using forms authentication and the permissions are
> specified in web.config files.
> Everything's fine as long as the listing of files goes, but I would only
> like to show the files to the
> user to which the user has permissions.


Everything you need to do this can be found in the DirectoryServices
namespace...

Bear in mind, though, that the currently authenticated user isn't
necessarily the account that ASP.NET is running under (in fact, it almost
certainly isn't).

This article shows you how to set file permissions:
http://www.codeproject.com/dotnet/ad...&select=821739
but the underlying process for checking permissions is virtually identical.

If you need any further assistance, I'd suggest you post in
microsoft.public.adsi.general, which is the newsgroup specifically for
ActiveDirectory matters. Make sure you tell them that you want to do this in
ASP.NET... Anything Joe Kaplan tells you can be considered as gospel...


--
Mark Rae
ASP.NET MVP
http://www.markrae.net

 
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
In-depth documenation on User Permissions, Group Permissions, ACLs, DCLs etc. Curt K ASP .Net 0 11-03-2006 04:54 PM
Getting TypeError in Changing file permissions Pranav Bagora Python 2 07-22-2005 09:56 PM
Getting other file permissions Florian Lindner Python 2 08-30-2004 02:02 PM
ASPX file returning obscur runtime error - after changing permissions to a subweb (.net app) to different permissions than on its parent ? Isabelle ASP .Net 0 08-11-2004 02:04 PM
Re: Permissions - giving "everyone" full permissions is bad ? Scott Allen ASP .Net 0 07-13-2004 08:54 PM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57