Hi FerrisUML,
Opening, closing files are done using System.IO.File. Storing the content
in memory can be done in any number of ways, like string, byte[] or
MemoryStream.
As for doing this in web applications you need to be aware of restrictions
for accessing the file system, which by default is limited to the web
application root folder and its subfolders.
If you need to access other folders, either open up for this folder/file by
adding read/write permissions to aspnet, or change the account used to run
the web application to something that has access to the file
--
Happy Coding!
Morten Wennevik [C# MVP]
"FerrisUML" wrote:
Im writing a small web application and what I'd like to do is open a
file, read the contents into memory and then close the file as fast as
I can to free up the file for the next user. Once the file is loaded
into memory and subsequently closed, i would use the contents of the
file (now loaded into memory) to perform some quick processing. Any
idea how best to do this?
Thanks in advance for your help!