Server Error in '/xxx' Application.
There is not enough space on the disk.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.IO.IOException: There is not enough space on the disk.
Source Error:
Line 118: Line 119: string newFile = Server.MapPath(InsusBase.TemporaryDirectory + newFileName); Line 120: FileUpload1.SaveAs(newFile); Line 121: Line 122: try
|
Source File: D:\IntranetSites\xxx\System\SiteMgt\VideoMedia\Media.aspx.cs Line: 120
Stack Trace:
[IOException: There is not enough space on the disk. ] System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath) +9723522 System.IO.FileStream.WriteCore(Byte[] buffer, Int32 offset, Int32 count) +9545638 System.IO.FileStream.Write(Byte[] array, Int32 offset, Int32 count) +146 System.Web.HttpRawUploadedContent.WriteBytes(Int32 offset, Int32 length, Stream stream) +128 System.Web.HttpInputStream.WriteTo(Stream s) +36 System.Web.HttpPostedFile.SaveAs(String filename) +114 System.Web.UI.WebControls.FileUpload.SaveAs(String filename) +23 System_SiteMgt_VideoMedia_Media.btnAdd_Click(Object sender, EventArgs e) in D:\IntranetSites\xxx\System\SiteMgt\VideoMedia\Media.aspx.cs:120 System.Web.UI.WebControls.Button.OnClick(EventArgs e) +118 System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument) +112 System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +10 System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +13 System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +36 System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +5563
|
Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.272
今天用户上传培训教程视频,都成功上传了几个200多MB大的文件,传至第四个时,出现上面的错误提示。 此站点在开发时,测试是可以允许上传2GB或以内的大文件。为何有此问题呢?
马上把服务器的站点程序部署于本机。上传测试,1.65GB大的文件,也能成功上传。没有问题呀?
如下是web.config的配置:
由于本机能测试成功,两种情况可以推断,一是网络问题,二是服务器问题。前者似乎没有悬疑,后那者呢?从哪入手?
检查服务器磁盘空间,那显示还有319GB的Free。怎会显示System.IO.IOException: There is not enough space on the disk.? ... 时间到了中午下班,不管怎样,先去吃饭,然后半个时休息,但此问题还没有解决,休息的质量是很差的,脑筋还是想起这个问题。
检查上传至服务器的临时文件,出错的文件只能上传67,040KB,被截除了。其余的上传的,全是0KB。
难道用户磁盘空间的限制? 如果是的话,是那一个用户呢?对于站点的话,应该是匿名用户。
打开磁盘分配空间,果然:
由于这是Intranet网站,服务器设置了磁盘使用空间,所有用户默认为1.5GB。把此用户的磁盘空间设置更大之后,问题也解决了。