Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > Visual Basic > VB 6 Visual Basic 6 > VB.NET
Password Reminder
| FAQ | Members List | Search | Today's Posts | Mark Forums Read
VB.NET General VB.NET discussions for issues that don't fall into other VB.NET forums.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the VB.NET section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old May 9th, 2005, 11:23 PM
Registered User
Join Date: May 2005
Location: , , .
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
Default .NET Remoting

i am using Remoting in VB.NET. I am using the same example givin in Wrox's Professional VB.NET 2003. The problem is if i am running Service DLL, Host Application and Client Application in the same computer then it is working fine. But if i am running client on other computer then an error is occuring the "Host is not listening". Both the computer in windows based LAN, their name is M10,M6. And amongst any of them are not Server. Server name is "TATASRV" and host application and service DLL are not on it they are in M10. Following is the code.

SimpleLibrary.DLL(Service DLL )
Public Class Calculator
    Inherits MarshalByRefObject
    Public Function GetThreadID() As Integer
        Return AppDomain.GetCurrentThreadId
    End Function
    Public Function Add2Numbers(ByVal A As Integer, ByVal B As Integer) As Long
        Return A + B
    End Function
End Class
SimpleServer(Host Application)
Imports System.Runtime.Remoting
Imports SimpleLibrary
Module Module1
    Sub Main()
        RemotingConfiguration.RegisterWellKnownServiceType (GetType(SimpleLibrary.Calculator), "Calculator.rem", WellKnownObjectMode.SingleCall)
        Channels.ChannelServices.RegisterChannel(New Channels.Tcp.TcpServerChannel(49341))
        Console.Write("Press <Enter> to exit")
    End Sub
End Module
SimpleClient(Client Application)
Private Sub connect_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles connect.Click
    RemotingConfiguration.RegisterWellKnownClientType( GetType(SimpleLibrary.Calculator), "http://localhost/SimpleHost/Calculator.rem")
    remote.Enabled = True
    connect.Enabled = False
End Sub
Private Sub remote_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles remote.Click
        Dim c As New SimpleLibrary.Calculator()
        txt2.Text = c.GetThreadID
End Sub
Please help me out.

Reply With Quote

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
.NET Remoting vikyjain General .NET 0 March 7th, 2005 12:50 AM
.NET Remoting application in vb.net Tek4VB .NET Web Services 6 November 19th, 2003 09:59 AM
Remoting (.Net) Indian Ocean .NET Web Services 6 November 12th, 2003 03:27 PM
.Net Remoting. kpphani .NET Web Services 5 August 1st, 2003 10:37 AM
.NET Enterprise Development in VB.NET Remoting burkert All Other Wrox Books 0 June 24th, 2003 09:04 AM

All times are GMT -4. The time now is 08:25 PM.

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.