JMKL1234

How can I create a class object that inherits from both BindingList(Of T) and MarshalByRefObject so that I can have an object that is a remotable binding list ...I need to be able to run the methods I create for this object on a different server than the client app that will use the class runs on.

Thanks!



Re: Visual Basic General Remoting

Bruno Yu - MSFT

JMKL1234,

It is strange that you want to create a class object that inherits both BindingList (Of T) and MarshalByRefObject. According to your demand, I recommend you to know something on the .NEt Remoting to accomplish your target.

There is an example on .NET Remoting. Please take a look at the following link and hope this example will help you:

A Simple Remoting HelloWorld:

http://www.codeproject.com/vb/net/Remoting_HelloWorld.asp






Re: Visual Basic General Remoting

JMKL1234

Thank you for the article, but it still doesn't solve my inheritance dilemma. I need to implement an object of my own to inherit from bindinglist(of T), but it has to be run on another server, so it has to also inherit from marshalbyrefobject - is there no way to somehow accomplish this

Also, what happens if I have two custom classes, ClassObj and ClassList, ClassList inheriting from bindinglist(of T). ClassObj inherits from MarshalByRefObject. Now, if I create a property in ClassObj of type ClassList (instantiated when ClassObj is instantiated), and if I instantiate ClassObj on another server and call ClassObj.ClassList.SomeMethod() - where does SomeMethod run since ClassList does not inherit from marshalbyrefobject as well Is it locally or on the server because it's a property instantiated in ClassObj which does run on the server when you call one of it's methods....

Thanks!