Protecting file / multi read and write C# / VB.Net
Posted on 2013-01-09
Here's my scenario.
1) there is a small file in app_data say "MyFile.xml" for use in users session
2) this file is read and contents filtered/put into dictionary in each users session (to avoid multi-read for such small data) when they visit page Startup.aspx
3) this file can be changed by any user on a different page, say Config.aspx
I guess I need to use threads to prevent Read/Write conflicts between users reading file when visiting Startup.aspx and a user writing on Config.aspx, and 2 or more users trying to change/read file at same time?
if so how - is reasoning right?