Skip to main content
← back to field notes
One min readDevelopment

Clearing ASP.Net Temporary Files

developmentdotnetasp.net

How to Clear Your ASP.NET Cache​

When you compile a web application, the compiled code is stored in the Temporary ASP.NET Files folder. This folder is a subdirectory of the .NET framework installation directory. While this setup is efficient, it can sometimes lead to strange caching behavior, especially in the Console or WebAccess. If an IIS reset doesn’t resolve the issue, clearing the Temporary ASP.NET Files might just do the trick.

Important

Do not delete the Temporary ASP.NET Files folder itself. Only clear its contents.

Using the Command Line Interface (CLI)​

  1. Stop IIS Before making any changes, ensure that IIS is stopped to avoid conflicts.

  2. Locate Your Temporary Directory Depending on your system configuration, the Temporary ASP.NET Files folder can be found in several locations. Here are the most common ones:

    # Delete all files from these directories
    C:\Windows\Microsoft.NET\Framework\v4.0.30319\"Temporary ASP.NET Files"

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

    Additionally, you may want to check these directories:

    %temp%\"Temporary ASP.NET Files"

    C:\Users\[youruserid]\AppData\Local\Temp\"Temporary ASP.NET Files"
  3. Restart IIS Once you’ve cleared the contents of the folder, restart IIS to apply the changes.

Why This Matters​

Clearing the Temporary ASP.NET Files can resolve issues caused by corrupted or outdated cached files. It’s a simple yet effective troubleshooting step that can save hours of debugging. Just remember to handle these files with care to avoid disrupting your application’s functionality.

field notes

you may also enjoy

more from this thread of thought

Introducing Git Revenge, and whether you should use it
Nov 5, 2026

Introducing Git Revenge, and whether you should use it

read more →
The cost of maintaining open source
Oct 27, 2026

The cost of maintaining open source

read more →
Is there a future without AI?
Oct 25, 2026

Is there a future without AI?

read more →
Introducing "Ink and Agency" a skill pack for humans (and claude)
May 18, 2026

Introducing "Ink and Agency" a skill pack for humans (and claude)

read more →
working with git: archive
Aug 5, 2025

working with git: archive

read more →
Surprise Driven Development
Jul 10, 2025

Surprise Driven Development

read more →
the field notes

recently written