Reply

Object "/AAAAA.rem" has been disconnected or does not exist at the Server

HI Everyone,

 

I wrote a procedure that is executed in a separate AppDomain. This procedure read, recursively, all properties of every  file contained in the main Assembly. When an assembly is very "big" this procedure take several times and after 10-12 minutes it returns the error: "Object "/AAAAA.rem" has been disconnected or does not exist at the Server".  In this class, that runs in a separate AppDomain, I overrided the LifeTimeManager method in this way:

public override object InitializeLifetimeService()
{
return null;
}

but still gives me this error. What can I do to avoid this?

 

Thnaks in advance.

3 REPLIES

Re: Object "/AAAAA.rem" has been disconnected or does not exist at the Server

[ Edited ]

The first question that I would answer is do you get the same result when not executing in a separate AppDomain. My suspicion is that the exception will occur with your current code in a default AppDomain.

 

If that's not the case, then something you can try is my SolidEdge.Community NuGet package. It has a custom built IsolatedTask<T> class that I wrote to handle this very scenario. You can either install the NuGet package and give it a try as-is or take a look at the source code to see how I implemented it. To my knowledge, that class has never had the issue that you describe. An example of how to use my IsolatedTask<T> would be my BatchPrint sample.

Jason Newell
Applications Architect
www.jasonnewell.net

Re: Object "/AAAAA.rem" has been disconnected or does not exist at the Server

Thanks for your replay (as always).

 

I tried to run the method in the default AppDomain and everything was fine (the procedure take about 48 minutes).

 

So, the problem is Class Lifetime that run on second appDomain.

 

Can you please explain how I should to use IsolatedTask<T> in my case?

Re: Object "/AAAAA.rem" has been disconnected or does not exist at the Server

Hi,

 

I used IsolatedTask class but the problem persists. When i execute all in the default AppDomain all goes fine, when i start the second app domain the procedure after 10 12 minutes returns the error. Can you help me?

 

Thanks.