Sometimes you may notice a strange caching behavior by the applications running in IIS. Today I found that my ASP.NET application showed a blank page. It is hosted on Windows Server 2019 in Azure Platform. I tried multiple times to resolve the issue but did not get success.

Advertisement

After searching about the issue, I found a suggestion in Google search to remove all ASP.NET temporary files. Once I removed all the temporary files, the application start working again.

Remove ASP.NET Temp Files in Windows

To clear the temporary files do the following on both the Web Server:

  1. Log in to the server and open IIS.
  2. Stop IIS service. Run “iisreset /stop” in the command prompt to stop the IIS service.
  3. Navigate to the below 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\”
  4. Remove all files under both directoires.
  5. Start IIS service. Run “iisreset /start” in the command prompt to stop the IIS service.

Wrap Up

Even you can remove the temporary file without stopping the IIS server. Hope this tutorial helps you to resolve the caching-related issue on your Windows server.

Share.

Leave A Reply