Click here to Skip to main content
15,936,119 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
I want to lock a folder through password for all types of accessing from unauthorized users. So that only authorized person can unlock it and work on it.

Let me know the proper C# commands to lock/encrypt and hide the folder.

kind Regards,

Sushil Saini
Posted
Updated 4-Jan-11 15:53pm
v2
Comments
Manfred Rudolf Bihy 4-Jan-11 21:15pm    
I'm really curious, why you would want to do that from code. All you would have to do to achieve this is to give the proper access rights (filesystem ACLs) to the folder for just those users who are allowed to access it.
Can you give us more details on your usage scenario?
Sergey Alexandrovich Kryukov 4-Jan-11 23:10pm    
I agree with Manfred on this. You better explain the bigger picture; may be the folder itself is not the best option for data protection. There are some other options.

TrueCrypt[^] is a free and open source application that solves your purpose.
 
Share this answer
 
Comments
Sergey Alexandrovich Kryukov 4-Jan-11 23:27pm    
Very interesting find (my 5). Most importantly it's open source.
Hope Lock a folder[^]will help you.

But it is a third party tool.
 
Share this answer
 
Comments
Sergey Alexandrovich Kryukov 4-Jan-11 23:15pm    
Kasson, this is a very interesting find (vote of 5). Is it open source or not?
justinonday 5-Jan-11 1:10am    
no answer
You can hide folders. You can also encrypt them. Google is your friend.
 
Share this answer
 
Is using C# and available documented API, why not using available mechanism designed for similar purposes -- Microsoft Isolated Storage?

This is where to start:

http://msdn.microsoft.com/en-us/library/3ak841sy.aspx[^]
 
Share this answer
 
v2
Comments
#realJSOP 5-Jan-11 8:02am    
Ya know, you really don't have to post inane comments for every response to every question.
Sergey Alexandrovich Kryukov 5-Jan-11 14:37pm    
Yes, I know. So, what's the purpose of this comment; and how it is relevant to this answer?

Thank you.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900