[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

microsoft.public.dotnet.framework.remoting

Remoting problem (SerializationException).

Tincho

7/23/2004 2:16:00 PM

Hi,

I have an application (lets call it MyApp) that can run in
2 different modes.

As an add-in of another application (OtherApp) or it can
run by itself.

When it works as an add-in, it is created using a COM
component that opens the add-in in the other application.
One of the functionality it offers is to import some data
from another system and in order to do so it uses remoting
client to get some objects from remoting server.


The problem I'm getting is that when I call the remoting
function, I get this exception :

System.Runtime.Serialization.SerializationException: Cannot
find the assembly.


This happens only when it is used from OtherApp.

The missing assembly is in MyApp installation directory
(which is different from the OtherApp's one).

As far as I was able to debug, the problem is that when
called from inside OtherApp, the AppDomain.CurrentDomain
path is not the one where the dll is.

The installation directories cannot be changed (MyApp
installation directory cannot be inside OtherApp
installation directory), so as to add the other path using
AppendPrivatePath (using AppendPrivatePath with
"..\..\..\MyApp" is not working.

I also tried handling the
AppDomain.CurrentDomain.AssemblyResolve event, but it seems
as if it is never thrown.

Placing the dlls in the GAC is not acceptable either
(because of company policies).

Any ideas of how to fix it?

Thanks in advance.

Tincho
2 Answers

Sunny

7/23/2004 3:34:00 PM

0

Hi,

In article <2d8401c470bf$98f56520$a301280a@phx.gbl>, robin_hoods@gmx.net
says...
>
> I also tried handling the
> AppDomain.CurrentDomain.AssemblyResolve event, but it seems
> as if it is never thrown.
>


I had never a problem with this. It works always. Are you sure that you
trap the event early enough?

Sunny

Tincho

7/23/2004 6:32:00 PM

0

Hi Sunny

Apparently we were handling the event in an improper way.

Sorry about that one, and thanks

Tincho


>-----Original Message-----
>Hi,
>
>In article <2d8401c470bf$98f56520$a301280a@phx.gbl>,
robin_hoods@gmx.net
>says...
>>
>> I also tried handling the
>> AppDomain.CurrentDomain.AssemblyResolve event, but it seems
>> as if it is never thrown.
>>
>
>
>I had never a problem with this. It works always. Are you
sure that you
>trap the event early enough?
>
>Sunny
>.
>