By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
454,702 Members | 1,432 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 454,702 IT Pros & Developers. It's quick & easy.

Remoting Problem

P: n/a
I'm trying to get my head around remotng and have created a class that can
accessed using remoting:

<RemotingService(WellKnownObjectMode.Singleton)> _
Public Class Customers
'tell .net that object will be created and kept on server, not moved to
the client
Inherits MarshalByRefObject

etc...

I can connect/instantiate the class from my client OK using:

Dim customers As Customers = CType(Activator.GetObject(GetType(Customers),
url), Customers)

but when I try to access a method like:

Dim customerID As Integer = Customers.CreateCustomer

I get the following exception:

"Attempted to create well-known object of type System.RuntimeType. Well
known objects must derive from the MarshalByRefObject class."

....which I find strange since my Customers class clearly inherits from
MarshalByRefObject!

Can anyone point me in the right direction to work out the problem?

[This is all taken from the sample in Ch20 of 'Professional VB.NET', 2nd Ed,
Wrox]

--

Cheers,

elziko
Nov 20 '05 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.