30th April, 2009

Access is denied when loading an assembly

Just solved this issue in .Net, when trying to load an external assembly, an unhelpful error of FileLoadException(Access is denied).

There is a directory in

$systemdrive$\Windows\Microsoft.Net\Framework\$respective_version$\Temporary ASP.Net Files

used to store the assemblies. If ASP.Net user and IUSR_LocalMachine do not have write and modify access to it, you can end up with locked .DLLs in there.

 

Add Comment

The opinions expressed here are my own and not those of my employer.