Referenced assembly won't load in new thread on IIS 7
Posted
by DanielC
on Stack Overflow
See other posts from Stack Overflow
or by DanielC
Published on 2010-05-25T19:44:13Z
Indexed on
2010/05/25
20:31 UTC
Read the original article
Hit count: 172
I have a process in which a user uploads a file to a web site where the file is then processed and uploaded into the database. The process of validating the file could take several minutes so as soon as the file is uploaded I create a new thread and I do my processing on this second thread. This works great on my local machine but doesn't work at all on my IIS 7 test server.
After some investigating I found the problem is that the process is trying to load a reference to Castle and it can't find the DLL. I have a copy of Castle DLLs in my bin and it works elsewhere in my app. I ran Fuslog and discovered that it is trying to load castle from the wrong location. It is trying to load from c:/windows/system32/inetsrv/.
It appears that under IIS 7 the second thread is executing in a different context or something.
So the question is what can I do to get it to find Castle in the application BIN folder?
© Stack Overflow or respective owner