Question

Our TeamCity agent machines have been struggling for disk space recently. I did a little snooping on each of the machines to find that the Temporary ASP.NET folder in the .NET installation directory was taking up more than 10GB of space on each box, each folder comprising of about 5MB each.

C:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files

I've done my research on the subject and I know that the files are a biproduct of ASP.NET's dynamic compliation, I also understand how IIS uses them for request optimisation (See: Understanding ASP.NET Dynamic Compilation)

What I don't understand is why no one else is complaining about how these files are taking up disk space on their build servers when they really only need to be used on their web servers.

Surely someone out there has run into this problem before, can anyone offer me a solution other than

  1. Disabling dynamic compliation (outlined here)
  2. Doing a brute force scheduled job deletion (outlined here)
Was it helpful?

Solution 2

In the end I had to settle for a PowerShell script that is run once a month as scheduled task, I followed Bredan's process outlined in this SysAdminSpot post, with only a few modifications

OTHER TIPS

These files are created when a website is actually run under IIS. They are not created when it is built and should not be on your build server. I am using TeamCity to build websites and do not have this issue. The files are created on the webservers of course, but not the build server.

Are you launching the website (for UI unit testing) perhaps?

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top