What exception in: FileContent without Close()

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

What exception in: FileContent without Close()

Guest-950

Hello Dean,

I am working on a ASP.NET 2.0 application with an installment of NeatUpload to handle uploading files. Some of our users sometimes get a frozen UI when uploading; the progressbar appears but does nothing, even after one hour. My investigation commenced only today, and I read in the documentation of the FileContent property that:

"If you use this property and don't either close the stream or call MoveTo before the request ends you may get an exception when NeatUpload tries to delete the underlying temporary storage at the end of the request."

The stream's close and MoveTo methods are not used in this code. My question is: what exception can I expect from this situation?

Many thanks in advance.

 

--Marco

Reply | Threaded
Open this post in threaded view
|

Re: What exception in: FileContent without Close()

Dean Brettle
Administrator
You would get something like this:

System.IO.IOException: The process cannot access the file 'filename' because it is being used by another process.

--Dean