VB.NET Remoting

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
 
O

One Handed Man [ OHM ]

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.
 
M

M.Perry

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
 
H

Herfried K. Wagner [MVP]

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top