Moskie
Moskie

Reputation: 1287

Determining the Temporary ASP.Net files folder location for a specific site

I have a server with dozens of web sites running on it, and I'm experiencing bad caching behavior on a few of them. I would like to delete the .COMPILED files that ASP.Net caches for them, but I am unable to determine the specific cache folder for a specific site. Underneath the Temporary ASP.Net files folder location are series of folders with arbitrary names (looks like parts of a GUID).

Is there a way to figure out which folder ASP.Net is using to cache files for a specific site?

Upvotes: 1

Views: 405

Answers (1)

pjotrok
pjotrok

Reputation: 56

You can use HttpRuntime.CodegenDir property. It will return path like: C:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files\website1\c2a2b44f\ce865b50

For more reference take a look at msdn site.

Upvotes: 4

Related Questions