Occasional "Could not load file or assembly" in asmx WebService on IIS and DFS

Posted by user8804 on Server Fault See other posts from Server Fault or by user8804
Published on 2009-06-09T00:28:49Z Indexed on 2012/04/12 5:33 UTC
Read the original article Hit count: 575

Filed under:
|
|
|

We have a handfull of ASMX web service hosted on two identical Windows Server 2003 boxes. The virtual directory for the web services is loaded in a DFS share, both servers point to the same share. We have a load balancer between the internet and the two web servers.

At a seemingly random interval (right now about twice per week) when a user tries to access a method on the web service, IIS returns the error: "Could not load file or assembly" for one of the assemblies used in the method call, and will continue reporting it each time the method is called until the app pool is recycled.

We haven't found any distinguishable pattern to the problem. This is what I know:

  • the missing assembly varies (but it's always a home-brew assembly)
  • the Web Service method that fails varies
  • there is no noticeable pattern to the times or intervals where the problem appears
  • there are no admin users accessing the servers when the problem appears
  • the failing method will work correctly on one server and fail on the other, even though both point to the same bin folder
  • the problem can always be corrected by recycling the app pool and making no other changes

I have enabled the Assembly Binder Log, and know that the binder is looking in the correct location for the file.

Our assemblies are compiled for .Net 3.5.

© Server Fault or respective owner

Related posts about iis

Related posts about ASP.NET