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
Marco
NA
5
0
Concurrent file write-access
Jul 1 2008 10:06 AM
Hi, I have a web service that logs some information to a text file; this web service is invoked asynchronously by a number of client apps, and this is causing a "The process cannot access the file because it is being used by another process" error.
This is the code I am using
FileStream fs = new FileStream(filename, FileMode.Append,
_FileAccess.Write, FileShare.Write);
writer = new StreamWriter(fs);
...
writer.Close();
No other code is accessing that file. Am I missing something?
Reply
Answers (
4
)
I’m exporting the Dot NET data grid to an excel file.
loading data into form