473,411 Members | 2,031 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,411 software developers and data experts.

User Has Access To File/Folder

I am new to .Net, so apologies if this is a simple question.

I need a way of display folders and files to my users. However, it must
show whether they have NTFS access to the file/folder.

For example, if they have access the folder or file is displayed as a link,
if they dont it is displayed only as text.

Is this possible? Any help would be greatly appreciated.
Nov 21 '05 #1
1 1063
Interesting question.

My first thought would be to utilize Windows Authentication, then in the
code that generates the display I would iterate through the directories and
generate links, but I would wrap the code that generates the link with a
try/catch so that if an exception occurred trying to read the directory or
file I would just display the text instead of the link. Not sure if this is
the best solution or if it would work correctly, but thats my first thought.

Another thought would be to programmatically access the lower level windows
API functions to determine if a user is in the ACL (Access Control List) for
the directory or file. See:
http://msdn.microsoft.com/library/de...curityinfo.asp

"Davie" wrote:
I am new to .Net, so apologies if this is a simple question.

I need a way of display folders and files to my users. However, it must
show whether they have NTFS access to the file/folder.

For example, if they have access the folder or file is displayed as a link,
if they dont it is displayed only as text.

Is this possible? Any help would be greatly appreciated.

Nov 21 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Peter | last post by:
Hello! Please, could anybody tell me, is it possible to run an asp page as particular user? I have this situation where I have one shared folder on particular server and this folder is shared...
1
by: Kiran_Juikar | last post by:
In my application, I want to copy some file from network location to local machine folder. It works fine for administrator but If I run it with restricted user (not having permissions to local...
8
by: Pete Wittig | last post by:
Hello, I am wondering if it is possible to create a networked application with C# that is seen as a windows user. For example, if Bob logged onto windows and then started the application, any...
0
by: John Dalberg | last post by:
I am trying to lock down file access of some sites in a shared hosting environment so that different users can only access their own site's directory with their asp.net code. However there's a...
2
by: flat_ross | last post by:
Hi, I am in a shop where developers are required to work off of a network share. This is so that code is backed up nightly. So I am testing running an ASP.NET Web application with a Class...
8
by: Razak | last post by:
Hi, I have a class which basically do Impersonation in my web application. From MS KB sample:- ++++++++++++++++++++code starts Dim impersonationContext As...
4
by: James | last post by:
I have a VB windows forms application that accesses a Microsoft Access database that has been secured using user-level security. The application is being deployed using No-Touch deployment. The...
5
by: Segfahlt | last post by:
I need a little help here please. I have 2 win forms user controls in 2 different projects that I'm hosting in 2 different virtual directories. The controls have been test and operate okay in...
2
by: Fox1977 | last post by:
Hi folks, Just wondering if anyone can help me out with this problem I'm having getting a particular .net web application to run on a windows 2003 r2 x64 platform running as a domain account. ...
2
dlite922
by: dlite922 | last post by:
I'm creating a batch file to be run on scheduled task on windows that sftp's a file using winscp to a linux machine. The password is saved in this bat file for all to see, so i need to create a...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.