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
Jez B
NA
2
4.3k
File Permission Problem in Windows 7
Aug 20 2010 4:47 PM
My program is appending to a log file in the common application data folder:
StreamWriter tw = new StreamWriter(Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.CommonApplicationData), "me.log"), append, System.Text.Encoding.UTF8);
...
On Windows XP this worked fine - one user ran the program and it writes to the log, another user runs it and it does the same - no problems. On Windows 7 however, the first user forces creation of the file but sets permissions on it which excludes the "Users" set - write access is only given to Administrators and the person that ran it. Another user running the program gets file permission errors when hitting this bit of code.
Question is, how can I set file permissions on the file when it is first created so that it is open to other users ?
Reply
Answers (
1
)
search database and display in datagrid view
how to show time in date time picket control