Wrox Home  
Search P2P Archive for: Go

  Return to Index  

aspx_professional thread: Streamwriter Namespace


Message #1 by bchaudhary@s... on Tue, 26 Feb 2002 23:07:18
Hi there,

	Make sure you close the TextWriter as in MyFileWriter.Close() or
the FileInfo as in MyFileInfo.Close(). If you close it right away after
modifying it, it should be released right away as well. If you are not
modifying the file to begin with, but just read it, consider using the
TextReader class instead as that usually does not lock the file.

Minh.

-----Original Message-----
From: bchaudhary@s...
[mailto:bchaudhary@s...] 
Sent: Wednesday, February 27, 2002 6:36 PM
To: ASPX_Professional
Subject: [aspx_professional] RE: Streamwriter Namespace


Thanks Minh, I wasn't aware of the system.xml namespace.  But I have one

more question still regarding File IO. If i call a file in asp.net and 
close the browser and go back to the document i was accessing it will be

locked for a good 3 minutes. In fact, when i try to run the web form
again 
it comes back and tells me the file is in use by another process. Any 
suggestions to free the file? Is there some garbage collection i should
be 
doing?



_________________________________________________________

Do You Yahoo!?

Get your free @yahoo.com address at http://mail.yahoo.com




  Return to Index