Click here to Skip to main content
15,905,563 members
Home / Discussions / C#
   

C#

 
GeneralRe: need help, treeView and active directory Pin
vcorn14-Jun-04 7:29
vcorn14-Jun-04 7:29 
GeneralRe: need help, treeView and active directory Pin
Dave Kreskowiak14-Jun-04 7:31
mveDave Kreskowiak14-Jun-04 7:31 
GeneralRe: need help, treeView and active directory Pin
vcorn14-Jun-04 7:43
vcorn14-Jun-04 7:43 
GeneralRe: need help, treeView and active directory Pin
Wackatronic14-Jun-04 7:57
Wackatronic14-Jun-04 7:57 
GeneralRe: need help, treeView and active directory Pin
Dave Kreskowiak14-Jun-04 8:02
mveDave Kreskowiak14-Jun-04 8:02 
GeneralRe: need help, treeView and active directory Pin
vcorn14-Jun-04 8:27
vcorn14-Jun-04 8:27 
GeneralRe: need help, treeView and active directory Pin
Dave Kreskowiak14-Jun-04 8:34
mveDave Kreskowiak14-Jun-04 8:34 
GeneralUnloading AppDomain Pin
Ami Bar14-Jun-04 5:50
Ami Bar14-Jun-04 5:50 
Hi,

I am writing a project that runs code from several assemblies.
Each assembly should be isolated, and the project supposes to be lightweight, therefore I am running one process and each assembly runs in a different AppDomain.

The project suppose that an assembly may crash or stack and uses the AppDomain.Unload() method to remove an AppDomain to release its resources.

I got to a problem once I tried to unload an AppDomain while a thread, that belonged to it, was waiting on a MessageQueue.Receive(). The AppDomain threw the CannotUnloadAppDomainException exception and didn't unload, or at least not gracefully.

The problem happens when a thread waits on a message queue and cannot be aborted, interrupted, or terminated forcefully. I didn’t try it, but I believe that the same happens when the thread waits for other things that use internally unmanaged code such as sockets.

How can I unload these AppDomains?
How can I force a thread to exit code that suppose to be managed such as MessageQueue.Receive() and Socket.Receive()?


Thanks,
Ami

GeneralRe: Unloading AppDomain Pin
Heath Stewart14-Jun-04 6:43
protectorHeath Stewart14-Jun-04 6:43 
GeneralRe: Unloading AppDomain Pin
Ami Bar14-Jun-04 10:35
Ami Bar14-Jun-04 10:35 
GeneralRe: Unloading AppDomain Pin
Heath Stewart14-Jun-04 11:01
protectorHeath Stewart14-Jun-04 11:01 
GeneralReflection Assistance please! Pin
Kasdoffe14-Jun-04 5:23
Kasdoffe14-Jun-04 5:23 
GeneralRe: Reflection Assistance please! Pin
Heath Stewart14-Jun-04 6:38
protectorHeath Stewart14-Jun-04 6:38 
GeneralRe: Reflection Assistance please! Pin
Anonymous14-Jun-04 7:02
Anonymous14-Jun-04 7:02 
GeneralRe: Reflection Assistance please! Pin
Heath Stewart14-Jun-04 8:46
protectorHeath Stewart14-Jun-04 8:46 
GeneralRe: Reflection Assistance please! Pin
Kasdoffe14-Jun-04 7:37
Kasdoffe14-Jun-04 7:37 
GeneralRe: Reflection Assistance please! Pin
Kasdoffe14-Jun-04 8:32
Kasdoffe14-Jun-04 8:32 
Generallooking for a tool or utility Pin
Anonymous14-Jun-04 4:54
Anonymous14-Jun-04 4:54 
GeneralRe: looking for a tool or utility Pin
Dave Kreskowiak14-Jun-04 5:07
mveDave Kreskowiak14-Jun-04 5:07 
GeneralRichTextBox selection color Pin
Judah Gabriel Himango14-Jun-04 4:31
sponsorJudah Gabriel Himango14-Jun-04 4:31 
GeneralRe: RichTextBox selection color Pin
Heath Stewart14-Jun-04 4:49
protectorHeath Stewart14-Jun-04 4:49 
GeneralRe: RichTextBox selection color Pin
Judah Gabriel Himango14-Jun-04 5:02
sponsorJudah Gabriel Himango14-Jun-04 5:02 
GeneralUpload files using SPS 2003 Pin
Member 67053114-Jun-04 4:16
Member 67053114-Jun-04 4:16 
GeneralUsing System.Data Pin
Simon Wren14-Jun-04 4:08
professionalSimon Wren14-Jun-04 4:08 
GeneralRe: Using System.Data Pin
Heath Stewart14-Jun-04 4:30
protectorHeath Stewart14-Jun-04 4:30 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.