dll's loaded through reflection - Phantom Bug

Posted by Seattle Leonard on Stack Overflow See other posts from Stack Overflow or by Seattle Leonard
Published on 2010-06-08T22:58:00Z Indexed on 2010/06/09 0:22 UTC
Read the original article Hit count: 540

Filed under:
|
|

Ok, I got a strange one here and I want to know if any of you have ever run accross anything like it.

So I've got this web app that loads up a bunch of dll's through reflection. Basically it looks for Types that are derived from certain abstract types and adds them to the list of things it can make.

Here's the weird part.

While developing there is never a problem. When installing it, there is never a problem to start with. Then, at a seemingly random time, the application breaks while trying to find all the types.

I've had 2 sites sitting side by side and one worked while the other did not, and they were configured exactly(and I mean exactly) the same.

IISRESET's never helped, but this did:

I simply moved all the dll's out of the bin directory then moved them back. That's right I just moved them out of the bin directory then put them right back where they came from and everything worked fine.

Any ideas?

Got some more info

When the site is working I notice this behavior: After IISRESET it still works, but recycling the app pool will cause it to break.

When the site is broken: Neiter IISRESET nor recycling the app pool fixes it, but moving a single dll out then back in fixes it.

© Stack Overflow or respective owner

Related posts about c#

Related posts about ASP.NET