Author: NoBullMan | Posted on: 8/21/2008 11:00:26 PM | Views : 620

Hi,

when I try to upload a file, I get the following error message:

System.ObjectDisposedException: Cannot access a closed file. at System.IO.__Error.FileNotOpen() at System.IO.FileStream.Seek(Int64 offset, SeekOrigin origin) at System.Web.HttpRawUploadedContent.TempFile.GetBytes(Int32 offset, Int32 length, Byte[] buffer, Int32 bufferOffset) at System.Web.HttpRawUploadedContent.WriteBytes(Int32 offset, Int32 length, Stream stream) at System.Web.HttpInputStream.WriteTo(Stream s) at System.Web.HttpPostedFile.SaveAs(String filename)

The file upload is part of a wizard step. I copy the file to a temporary directory when the next step is clicked. I check the folder where the file is supposed to be copied to and the file size is 0. If I click the back button of the wizard to go tothe previoous step, then I see the above error message printed.

I googled the error message and it seems everyone mentioned something about the file size. But I have modified web.c ...

Go to the complete details ...