.NET Framework Bookmark and Share   
 index > .NET Remoting and Runtime Serialization > marshal mechanism
 

marshal mechanism

Hello !

When an object get marshaled by ref (through .net remote client call),
all references it hold also get marshaled too--except those new inside itself.

Is this the correct statement?

Technically,
class MyService : MarshalByRefObject {
MyObject myObj = new MyObject(); // stay native
MyObject hisObj = someOneElse.Object; // become TransparentProxy
...
}

Thanks,
sovann
sovann

Can you provide a complete repro of the problem?

Thanks.

Nathan Anderson - MSFT

Well, I am trying to make remote UI server on a Form.

The remote service is defined in another class, which access the form in its implement.

When remote client calls, that service can no longer access the form.

It works fine if the form implements the service by itself. But we want to seperate concern between desktop application from remote access.

 class MyForm : System.Windows.Forms {

  ....

  public MyForm() {

    ....

    // open TCP port, host my MyService

  }

}

public interface IMyService {

  public void ServiceMethod();

}

class MyService : MarshalByRefObject, IMyService {

  public MyService(MyForm form) { ... }

  public void ServiceMethod() { //use the form here }

}

 

 

Thing works just fine when the form implements the service by itself. But this is not what we want.

class MyForm : System.Windows.Forms, IMyService  {

  ....

  public MyForm() {

    ....

    // open TCP port, host myself as IMyService

  }

  public void ServiceMethod() { // access UI on the form }

}

 Thank you.

sovann

sovann

You can use google to search for other answers

Custom Search

More Threads

• Thread was being aborted???
• Remote Access of COM+ component gives -- access denied -- error
• Remoting and Serializationexception
• How to append encrypted serialized objects to a file?
• .NET SSL Problems
• Using .NET Remoting within a CLR Trigger?
• Connection does not startup properly when network is too slow
• Does my proxy implements myinterface ?
• DeSerializing Data from IsolatedStorage
• Remoting or Assembly.Load ??