Re: Can't connect to remote object
From: Sam Santiago (ssantiago_at_n0spam-SoftiTechture.com)
Date: 10/11/04
- Next message: Ken Kolda: "Re: Performance Monitoring: Context Proxies"
- Previous message: Ken Kolda: "Re: Can't connect to remote object"
- In reply to: SOS: "Can't connect to remote object"
- Messages sorted by: [ date ] [ thread ]
Date: Mon, 11 Oct 2004 14:11:15 -0700
Trying starting with this example from Microsoft Quickstart examples:
http://samples.gotdotnet.com/quickstart/howto/doc/remoting/mainfeatures.aspx
Thanks,
Sam
-- _______________________________ Sam Santiago ssantiago@n0spam-SoftiTechture.com http://www.SoftiTechture.com _______________________________ "SOS" <SOS@dd> wrote in message news:emQxND9rEHA.1644@tk2msftngp13.phx.gbl... > hi guys , > > i'm trying to learn how to use .Net Remoting ! > i created a class like this : > > > public class MyClass : MarshalByRefObject > > { > > public MyClass() > > { > > Console.WriteLine("my object created !"); > > } > > > > > > public void DoSomething() > > { > > // do sometthing here > > } > > } > > > > and i use of a windows application to register this class : > > > > public void Main() > > { > > HttpServerChannel channel = new HttpServerChannel(8080); > > ChannelServices.RegisterChannel(channel); > > > > > RemotingConfiguration.RegisterWellKnownServiceType(typeof(MyClass),"MyClass" > ,WellKnownObjectMode.Singleton); > > MessageBox.Show("Registered !"); > > } > > > > and finally , i use of this code to access the remote object. > but when i try to invoke a method of my remote class , this error occure : > can't connect to remote object ... > > > > public void Main() > > { > > ChannelServices.RegisterChannel(new HttpServerChannel()); > > > > MyClass myclass = (MyClass) > Activator.GetObject(typeof(MyClass),"http://localhost:8080/MyClass"); > > if (myclass != null) > > { > > myclass.DoSomething(); > > } > > > > } > > > > what's wrong ? > > Thanx > > > >
- Next message: Ken Kolda: "Re: Performance Monitoring: Context Proxies"
- Previous message: Ken Kolda: "Re: Can't connect to remote object"
- In reply to: SOS: "Can't connect to remote object"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|