Dan Kelley
6/11/2004 3:07:00 PM
To deserialise your object, the remoting component (or any other) needs to know how this object should be deserialised. If I told you I had an object called Thing, how would deserialise it?
For what it is worth, you would be better moving your object into its own class library, rather than having it in the same dll as your page, to decouple the two.
Ingo Rammer has a good explanation on his site about how you can further enhance things using interfaces, to further reduce the dependence between your components.
Cheers
Danny
"Henrik de Jong" wrote:
> Hi All,
>
> I've got an remote-object as a singleton. This singleton has some procs wich
> accepts TObjects (Delphi) or System.Object 's This singleton is compiled in
> lets say a dll with the name my_remote_singleton.dll
>
> My ASP.NET application has a class TMyObject:
>
> [Serializable]
> TMyObject = class(TObject)
> public
> Name: string;
> end;
>
> This asp.net application is compiled in a dll, lets say
> WebApplication26.dll. (this contains both the webpage and tmyobject)
> On my webform I dropped a button, the code beneath that button connects to
> the remote object based on a interface in the shared dll remote_intf.dll.
>
> Now the problem:
>
> Seralization is not done because of the error that the dll
> WebApplication26.dll cannot be found. The occurs at the point at wich the
> proc is invoked wich should accept this object.
> When I copy the webapplication26.dll to the bin-directory of my remote
> singleton, nothing is wrong. Why need my remote-singleton my client
> dll(webapplication26.dll) in wich the object TMyObject is defined?
>
> Kind regards,
> Henrik de Jong
>
>
>