I have a site that uses a separate assembly for logging. This assembly will write to the event log any errors that are thrown in the code on my aspx page. For some reason I randomly (and I say randomly because I haven't found the exact steps to reproduce the error) get an error saying that access is denied:
Could not load file or assembly 'Logging, Version=1.0.0.0, Culture=neutral, PublicKeyToken=49d029f85976040e' or one of its dependencies. Access is denied.
The assembly is referenced at the top of my aspx page:
<%@ Assembly Name="Logging, Version=1.0.0.0, Culture=neutral, PublicKeyToken=49d029f85976040e" %>
If I restart IIS it will clear up the error. But it will eventually come back. So that is not an acceptable solution.
Any ideas?
PS I'm using ASP.net 2.0 running on windows server 2008 sp1 and IIS 7.