简体   繁体   中英

There is not enough space on the disk on ASP.NET application

I have the following setup on the Windows IIS machine with .NET 4.0 installed. 2 drives, C and D. The inetpub folder which contains my websites are on the D drive.
My only web site saves the attachments to the D drive.
My C drive has got no space on it (for arguments sake 0kb).

Why would I get the following error when attempting to 'upload' attachments via the website to the D drive when the C drive is the one that's without space? Does .NET for example first copy it in a temp folder on C drive?

Here's the error:

[IOException: There is not enough space on the disk.
]
   System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath) +9718418
   System.IO.FileStream.WriteCore(Byte[] buffer, Int32 offset, Int32 count) +9555882
   System.IO.FileStream.Write(Byte[] array, Int32 offset, Int32 count) +146
   System.Web.TempFile.AddBytes(Byte[] data, Int32 offset, Int32 length) +32
   System.Web.HttpRawUploadedContent.AddBytes(Byte[] data, Int32 offset, Int32 length) +8788874
   System.Web.HttpRequest.GetEntireRawContent() +9035719
   System.Web.HttpRequest.GetMultipartContent() +68
   System.Web.HttpRequest.FillInFormCollection() +247
   System.Web.HttpRequest.get_Form() +104
   System.Web.HttpRequest.get_HasForm() +9036655
   System.Web.UI.Page.GetCollectionBasedOnMethod(Boolean dontReturnNull) +97
   System.Web.UI.Page.DeterminePostBackMode() +69
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +135

The temp folders used by your IIS is on C drive. That is the one causing this issue.

IIS is trying to write the files into the temporary files which is usually located under C:\\Windows\\Microsoft.net\\Framework\\<version>\\Temporary ASP.NET Files

type "run" in Search text box and Press Enter button, then click on "Run". Now type %temp% inside the Run textbox and press OK button. Now it will be Open all the temporary file location ie "C:\\Users\\ASUS\\AppData\\Local\\Temp" Now delete all the files of this folder as possible.

Even, i faced the same weird error when i run my wcf service. After deleting the temp asp.net files from C:\\Windows\\Microsoft.NET\\Framework\\v2.0.50727\\Temporary ASP.NET Files. I was able to run again.

Run it as administrator, using the right-click menu. Restart your computer if necessary. This was helpful for me.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM