TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
brinda lakhani
NA
13
5.8k
How to lock folder by programmatically in c#.net?
Feb 20 2015 2:03 AM
I am developing a window application of screen capturing for my company use. I want capture the screen shoot and store those screen shots automatically in lock folder by programming. And after storing, i want to upload those screen shots on my company's server from that lock folder. so, I don't want to perform operations like delete, copy, paste on that folder. My problem is that, when I write Fullcontrol then I'm not able to store that screen shots in folder. So, Please tell me, how to do this? Which kind of access i have to give?
This is my code:
private void Permissionbtn_Click_1(object sender, EventArgs e)
{
DirectoryInfo myDirectoryInfo = new DirectoryInfo(textBox1.Text);
DirectorySecurity myDirectorySecurity = myDirectoryInfo.GetAccessControl();
string User = System.Environment.UserDomainName + "\\" +
comboBox1.SelectedItem.ToString();
myDirectorySecurity.AddAccessRule(new FileSystemAccessRule(User,
FileSystemRights.Read , AccessControlType.Deny));
myDirectoryInfo.SetAccessControl(myDirectorySecurity);
MessageBox.Show("Permissions Altered Successfully");
}
Reply
Answers (
1
)
How do I delete the contents of a RichTextBox and add new co
how to run google map html code using webbrowser control