Blog Post

IIS Support Blog
1 MIN READ

ASP.NET Temp file accumulation on server

PradeepSharma's avatar
PradeepSharma
Icon for Microsoft rankMicrosoft
Nov 28, 2023

Issue:

Many of our customers have observed ASP.NET files piled up on many of the servers and size has gone up to 100 GB. and wanted to know it happens and the impact of removing the same.

 

Temp file accumulation at C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Temporary ASP.NET Files\root path.

 

Cause:

By default, when you compile a Web application the compiled code is placed in the Temporary ASP.NET Files folder. This folder is a sub-directory of the location where you installed the .NET framework. There were more than 40 websites hosted on the single server.

 

Solution:

You can feel free to delete anything below Temporary ASP.NET Files (Worth noting that you mustn't delete the Temporary ASP.NET Files folder itself but you can clear its contents.). All of the contents will be generated again after you rebuild project.

So, removing the temp files may result in slow initial response. But once the files are recompiled the users won't be seeing any slowness.

 

Updated May 06, 2025
Version 2.0

1 Comment

  • DaniilGerasimov's avatar
    DaniilGerasimov
    Copper Contributor

    Hi! Thank you for clearing this question.
    And could you please help with the next one - is it safe to clean nested folders of Temporary ASP.NET Files while IIS application pools that use them are running and accepting traffic, could this operation affect availability of application running in apppool?

    Thanks in advance!