Hello,
I happen to run into the same issue.
As always with the multitheading issue, the description of the problem is somewhat complex.
My application is a web application in ASP.NET 2.0 using Nhibernate 1.0.3 + Sqlite.
The purpose of the program is to be able to retreive code from various source control system (CVS and SVN). This operation could be long so we decided to go multithreaded and spawns various processes (svn.exe + cvs.exe) with the appropriate command line options. The checkout is know to be state=in progress.
The application registers a call back when the processes end/fail and update the state of the checkouts (state=done/failed)
Everything ran fine until we introduced Nhibernate to handle our persistance.
I love Nhibernate. Used many times before. But I have to recognize that the mix mutlithreading+nhibernate+ado.net didn't work out.
When using Nh, the call back failed to be triggered. We tried everything. And only removing Nh and re-introducing it little by little helped.
So we narrowed down the problem to a saveOrUpdate called before the new process is launched. We use a HTTP module to manage the session/session factories and took extra care not to mess with sessions and threads.
We were desperate until we found the following article in msdn and give the aspcompat a try.
http://support.microsoft.com/?scid=kb%3 ... 7&x=9&y=11
And it worked !
I'm not sure I understood the very causes of the pb, but, hell, now everything is fine.
Go figure,
Bertrand.