When a COM reference is made to a COM DLL (like calling it from ASP), a file lock is placed on the COM DLL until the process is finished. In the case of ASP, the web server's process (either inetinfo.exe or sometimes dllhost.exe) establishes the lock. This process normally doesn't end for a long time. You either have to cycle IIS (cmd: iisreset) or reboot. Then the DLL is unlocked.
.NET assemblies on the other hand do not have this problem because it is not referenced by COM. Even when running in ASP.NET. The reason for this is the way .NET works. The .NET assembly contains intermediate code (MSIL: MicroSoft Intermediate Language). MSIL is 'generic' .NET code. When an assembly is needed, .NET pulls in the .DLL file, and compiles the MSIL code to machine code and caches the result. It then turns on a file watch on that DLL file and releases the file. If it sees the file change (you recompile or in another way update the DLL) it drops the cached machine code and recompiles it from the updated DLL.
-
Peter