vb.net remoting

  • 18 years ago

    Hi,


    Currently I'm trying to implement .NET remoting. However I'm facing a trouble with this remoting very often. I can start my remote server and can able to connect from the Client. After a few mins., if I try to connect again from the Client PC I got following message.


    Object <object1uri> has been disconnected or does not exit at the server.


    This is my code in the server side.



           Dim channel As New HttpChannel(8080)
           ChannelServices.RegisterChannel(channel)


           Dim object1 As New Remote.CreateConnection()
           Dim ref1 As ObjRef = RemotingServices.Marshal(object1, "object1uri")
           Console.WriteLine("ObjRef.URI: " & ref1.URI)
           object1.InitializeLifetimeService()





    my client side code is


           dim gObjRemote As Remote.CreateConnection
           Dim channel As New HttpChannel(0)


           ChannelServices.RegisterChannel(channel)
           RemotingConfiguration.RegisterWellKnownClientType(Type.GetType("Remote.CreateConnection, Remote"), "http://localhost:8080/object1uri")


           gObjRemote = New Remote.CreateConnection()




    Can any one help what's going wrong?


    Thanks in advance.

Post a reply

No one has replied yet! Why not be the first?

Sign in or Join us (it's free).

Contribute

Why not write for us? Or you could submit an event or a user group in your area. Alternatively just tell us what you think!

Our tools

We've got automatic conversion tools to convert C# to VB.NET, VB.NET to C#. Also you can compress javascript and compress css and generate sql connection strings.

“In theory, theory and practice are the same. In practice, they're not.”