Comment 8 for bug 423611

Revision history for this message
David Schmitt (david-dasz) wrote :

I finally found the cause for this problem. The closing of the WCF ServiceHost in the example races with the AppDomainUnload a few lines later. Adding a three second delay after host.Close() in Skel.Stop() Code.cs:~120 gives the ServiceHost enough time to finish and the AppDomainUnloadedException does not occur.

Strangely enough I still cannot reproduce the behaviour without running under NUnit. I do believe though that this constitutes a bug in WCF that is (only) triggered by NUnit.