Originally Posted by: "C"
Since the error over the weekend it has not repeated. The only thing I did was move the web.config - attempt to load the site (triggering compile I think?) and then dropping the web.config back into place.
No errors since.
Here's what I think happened...
When you copy DLL's to the bin directory of your web site, or change any files that automatically get compiled (*.aspx, *.ascx, *.asax, *.vb, *.cs, etc), ASP.NET will do some housekeeping. Part of that housekeeping involves making a copy of the affected assemblies in the Microsoft.NET Temporary Internet Files directory (which is were the DLL's are actually loaded from).
Those file changes will kick off any other process that is watching those directories as well, such as the Indexing Server and virus scanner.
If those other processes lock one of the assemblies that ASP.NET is trying to copy, or replace, or delete, ASP.NET will be unable to load the assembly and you will see a message just like the one you reported.
Making a change to web.config after some delay is one way to fix the problem. That change will cause ASP.NET to reload all of the assemblies, but without needing to copy them again. So it is usually successful, even if you have multiple processes fighting over the files.
If this is the problem, the long term solution is to disable indexing, virus scanning, etc. of the web site bin files and the Microsoft.NET Temporary Internet Files directory.