I need an asp.net webpage to read some text from a file stored on the same server as the webpage, will the following code result in a concurrency error if several people visit the webpage at once and thus several requests to read the file are generated:
string fileText = System.IO.File.ReadAllText(Request.PhysicalApplicationPath + @"Folder\File.txt");
If it would result in an error, what would be a concurrency safe manner to read a file from an asp.net page?
Thanks.
Based on your comment, read it on application start event from global.asax file and put it in to application level variable. So whole of the application users can access without any issue,