Where are my ASP.NET Temporary Files Stored?

Ever wondered where ASP.NET stored its temporary files? ASP.NET provides the HttpRuntime.CodeGenDir property which gets the physical path to the directory where ASP.NET stores temporary files (generated sources, compiled assemblies, and so on) for the current application.
Here’s how to use this property:

protected void Page_Load(object sender, EventArgs e)

Running this on my machine, I get the following output

C:\Users\Suprotim\AppData\Local\Temp\Temporary ASP.NET Files\SampleProjects\e2124d07\bbtb1290

About The Author

Suprotim Agarwal
Suprotim Agarwal, Developer Technologies MVP (Microsoft Most Valuable Professional) is the founder and contributor for DevCurry, DotNetCurry and SQLServerCurry. He is the Chief Editor of a Developer Magazine called DNC Magazine. He has also authored two Books - 51 Recipes using jQuery with ASP.NET Controls. and The Absolutely Awesome jQuery CookBook.

Follow him on twitter @suprotimagarwal.

1 comment:

Anonymous said...

very nice blog and informative.