Recently, when I tried to upload a new module to DotNetNuke, I received the following error:
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()
To fix it, open the Web.config file and locate the line:
<httpRuntime useFullyQualifiedRedirectUrl="true" maxRequestLength="8192" />
Add this attribute
requestLengthDiskThreshold="8192"
So it looks this:
<httpRuntime useFullyQualifiedRedirectUrl="true" maxRequestLength="8192" requestLengthDiskThreshold="8192" />