Views: 12.8K
Replies: 3
Archived
|
File locking questionIn my ASP.NET application I log all the exceptions to a log file.
This can be a issue when multiple requests try to write at the same time to the log file. How is this scenario best handled? Rahul Sabharwal, Jul 25, 2010
|
|
Reply 1Another popular logging framework is Log4net. http://logging.apache.org/log4net/
Andrew Green, Jul 29, 2010
|
|
Reply 2Lock code block which has been used to write log to the file using "lock Statement". This statement would not been executed until previous execution has been completed.
For detail visit http://msdn.microsoft.com/en-us/library/c5kehkcz(VS.80).aspx link. Mihir Vinchhi, Jul 29, 2010
|
|
Reply 3You may use the Enterprise Library from Codeplex for your scenario. It has all the patterns implemented to handle the mutithreaded scenario like yours.
Sreenivas Manyam Rajaram, Jul 26, 2010
|