Not enough disk space in ASP.NET application

I have the following installation installed on a Windows IIS computer with .NET 4.0 installed. 2, C and D. The inetpub folder containing my websites is located on drive D.
My only website saves attachments to drive D.
My C drive has no place on it (for arguments for the sake of 0kb).

Why should I get the following error when trying to โ€œuploadโ€ attachments through a website to drive D if drive C is the one with no space? Can .NET, for example, first copy it to a temporary folder on drive C?

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 
+4
source share
3 answers

The temporary folders used by your IIS are located on drive C. This causes this problem.

IIS tries to write files to temporary files, which are usually located under C:\Windows\Microsoft.net\Framework\<version>\Temporary ASP.NET Files

+9
source

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

0
source

type "Run" in the search text box and press the "Enter" button, then click "Run." Now enter% temp% in the Run text box and click OK. Now the entire temporary location of the file will be opened, i.e. "C: \ Users \ ASUS \ AppData \ Local \ Temp" Now delete all the files in this folder as much as possible.

0
source

Source: https://habr.com/ru/post/1443218/


All Articles