views:

30

answers:

2

Where are they stored? And is there a way to determine when they get deleted? Is there a way to make it so that they are never deleted, so as to improve performance for example?

Another issue - in a busy hosting environment how big could all the dll's get? Let's say if you have 1000 medium websites?

+1  A: 

Where are they stored?

It depends on if you compile them before deployment or after deployment. If you compile them before deployment you will deploy them directly to the /bin folder of your app. This is what I normally do.

If you let asp.net compile after deployment there are a couple places they can end up, and it's not something I usually concern myself with. They are only re-compiled if something in the site changes, and so they are not deleted ever, merely over-written.

The size of a compiled dll file is generally comparable to that of the source files that are used to build it.

Note that these .Net dlls consist mainly of IL and do not yet have fully-compiled native code. They will be taken the rest of the way to native code when your app is started (in asp.net: when the first http request comes in) by the just-in-time compiler. You can use a tool like ngen to pre-compile them, but this is not normally the best option. Again, the location of this final code is not something I normally concern myself with.

Joel Coehoorn
I do think however that they are deleted where my site is hosted. One of my websites that has low traffic always takes 10 - 15 seconds to load once first opening it. After that everything is normal. I think this indicates that the site is recompiled by asp.net, or could it be something else?
diamandiev
What's happening is the framework is starting up and the just-in-time compiler is compiling the IL in your dll files down to native code. This native code often exists only in memory, and if your app is idle long enough IIS will shut it down. There goes your memory-only native code. What I do to solve this problem for apps that aren't used often is change a few settings in IIS to keep them alive longer, so they don't get shutdown in the first place. But I don't need to do it often enough to remember how to find these settings :(
Joel Coehoorn
Thanks for the clear explanation, now I understand.
diamandiev
A: 

You're probably looking for the Temporary ASP.NET Files folder, which is inside the .NET Framework directory. See http://msdn.microsoft.com/en-us/library/ms366723.aspx for more information.

Bob