VB.NET Remoting

  • Thread starter Thread starter M.Perry
  • Start date Start date
M

M.Perry

I am trying to set up two VB.NET Applications. One to sit
on the server and run and the other to sit on a client
computer and connect to the server application and for the
server application to send data to the client application.

Well, when I'm trying to connect to the server application
from the client application I get the followng error:
No connection could be made because the target machine
actively refused it.

But, when I try to just connect the two applications via
localhost to localhost it works just fine. Anyone who has
any ideas on how to correct this would be greatly
appreciated.

Thanks

M.Perry


The following set of code is how I set up the Server
Listener:

<DnsPermissionAttribute(SecurityAction.Demand,
Unrestricted:=True)> Public Class clTOAServer
Inherits MarshalByRefObject
Private thServer As Thread

Public Sub Main()
thServer = New Thread(AddressOf ServerListener)
thServer.Start()
End Sub
Public Sub ServerListener()
Const toaPortNum As Integer = 8080

Dim clientIP As IPAddress = IPAddress.Parse
("171.172.56.33")
Dim toaListener As New TcpListener(clientIP, toaPortNum)
toaListener.Start()
Try
Dim tcpClient As TcpClient = toaListener.AcceptTcpClient()
Catch
......
End Sub


The following is how I set up my client class to connect
to the server class:

Public Shared Property GetServerObjects()
Get
Dim aryReturnData As Array

Dim tcpClient As New System.Net.Sockets.TcpClient

Dim serverIP As IPAddress = IPAddress.Parse
("171.172.55.154")
tcpClient.Connect("171.172.55.154", 8080)
End Get

End Property
 
Where to start ?

Can you connect to this machine ( server from your client ) with other
network enabled applications using your current logon ?, if not thats your
win32 Security stopping you !

If not we need to know more details on how you are trying to connext and
what you are trying to do.
 
Thank you for that information. I can not connect to the
server with my user logon information. Although, I can
map to the drive on the server using my administrative
rights, would this be sufficient enough to allow for the
connection to the server from my client machine.

Thanks,

M. Perry
 
Hello,

M.Perry said:
I am trying to set up two VB.NET Applications. One to sit
on the server and run and the other to sit on a client
computer and connect to the server application and for the
server application to send data to the client application.

Well, when I'm trying to connect to the server application
from the client application I get the followng error:
No connection could be made because the target machine
actively refused it.

But, when I try to just connect the two applications via
localhost to localhost it works just fine. Anyone who has
any ideas on how to correct this would be greatly
appreciated.

This is a VB.NET language group. Notice that you will have a better
chance to get an answer if you post to the Remoting newsgroup in future:

news://msnews.microsoft.com/microsoft.public.dotnet.framework.remoting

Web interface:

http://msdn.microsoft.com/newsgroup...up=microsoft.public.dotnet.framework.remoting
 
Back
Top