Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do "Temporary ASP.NET Files" get created (and how to prevent duplicates)

Tags:

c#

.net

asp.net

I have an issue where a dll shown twice in the Modules debug window for my WCF service (hosted by an IIS Project).

They are both loaded from my "Temporary ASP.NET Files" folders.

C:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files\root\d9bf3211\b2544e2b\assembly\dl3\4cfa5823\28f464b9_9a03cd01\InversionOfControl.DLL
C:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files\root\d9bf3211\b2544e2b\assembly\dl3\4cfa5823\2457a584_9803cd01\InversionOfControl.dll

The paths are almost exactly the same, but the folder name that holds the dll is different.

So here are my questions:

  1. What is "Temporary ASP.NET Files" for?

  2. Why not just reference the dll that is in my build folder.

  3. How could I have gotten two?

  4. How can I prevent it from happening again?

  5. If I just delete them will this problem be "fixed"?

The ones in bold are the answers I am most interested in.

like image 841
Vaccano Avatar asked Feb 02 '23 07:02

Vaccano


1 Answers

You can feel free to delete anything below Temporary ASP.NET Files. All of the contents will be generated again (albeit with an initial performance penalty).

Also note that it is easier to use explorer to do this if you kill IIS temporarily. (iisreset /stop, delete the files, iisreset /start).

like image 184
Guvante Avatar answered Feb 05 '23 05:02

Guvante