Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / ASP.NET / General / July 2007

Tip: Looking for answers? Try searching our database.

Getting file permissions

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
kratc - 23 Jul 2007 11:22 GMT
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..
Mark Rae [MVP] - 23 Jul 2007 11:39 GMT
> I'm trying to list all the files in a directory (with subdirectories) to
> which the logged in user has
[quoted text clipped - 3 lines]
> 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/adduseracetofile.asp?df=100&forumid=15281&exp=
0&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...

Signature

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


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
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



©2008 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.