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

Git for designers and writers, without the terminal
Nov 25, 2026

Git for designers and writers, without the terminal

read more →
Notebooks, datasets and API keys: making git behave for data work
Nov 24, 2026

Notebooks, datasets and API keys: making git behave for data work

read more →
A git GUI for people who live in the terminal
Nov 23, 2026

A git GUI for people who live in the terminal

read more →
A git client your security team has nothing to ask about
Nov 20, 2026

A git client your security team has nothing to ask about

read more →
Three of me in one git log: keeping identities apart with includeIf
Nov 19, 2026

Three of me in one git log: keeping identities apart with includeIf

read more →
A free git client for private repos and self-hosted git
Nov 18, 2026

A free git client for private repos and self-hosted git

read more →
the field notes

recently written