DotNetNuke Daily Tip #5 6/28/06 Cannot access a closed file

Check out all of the DotNetNuke Daily Tips from Chris Hammond.

DotNetNuke Daily Tip for 6/28/2006

If you've ever received the following error while trying to upload a DotNetNuke module here's a quick fix.

ExceptionSystem.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.CopyBytes(Int32 offset, Byte[] buffer, Int32 bufferOffset, Int32 length) at System.Web.HttpInputStream.Read(Byte[] buffer, Int32 offset, Int32 count) at ICSharpCode.SharpZipLib.Zip.ZipInputStream.FillBuf(Int32 size) at ICSharpCode.SharpZipLib.Zip.ZipInputStream.GetNextEntry() at DotNetNuke.Modules.Admin.ResourceInstaller.PaInstaller.ReadZipStream() at DotNetNuke.Modules.Admin.ResourceInstaller.PaInstaller.Install()

What version of DNN are you running? Is it 3.*? What version of the .Net framework is your site running on? If it's 2.0 that's most likely your case. We ran into this problem earlier today in our testing environment. To fix it, in IIS on the ASP.NET tab for your site be sure to set it to 1.1!

Thanks to Jianxiong for sending me the error message.

Stay tuned for another DotNetNuke Daily Tip coming tomorrow!

5 Comments

Comments have been disabled for this content.