By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
443,569 Members | 1,615 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 443,569 IT Pros & Developers. It's quick & easy.

VB.NET Remoting

P: n/a
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
Nov 20 '05 #1
Share this Question
Share on Google+
4 Replies


P: n/a
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.Perry" <mp******@aol.com> wrote in message
news:0c****************************@phx.gbl...
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

Nov 20 '05 #2

P: n/a
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

-----Original Message-----
Where to start ?

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

If not we need to know more details on how you are trying to connext andwhat you are trying to do.



"M.Perry" <mp******@aol.com> wrote in message
news:0c****************************@phx.gbl...
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

.

Nov 20 '05 #3

P: n/a
Hello,

"M.Perry" <mp******@aol.com> schrieb:
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/microsof...ework.remoting

Web interface:

http://msdn.microsoft.com/newsgroups...ework.remoting

--
Herfried K. Wagner
MVP VB Classic, VB.NET
http://www.mvps.org/dotnet
Nov 20 '05 #4

P: n/a
Try running your code when signed on as administrator.

"M.Perry" <mp******@aol.com> wrote in message
news:04****************************@phx.gbl...
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

-----Original Message-----
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.Perry" <mp******@aol.com> wrote in message
news:0c****************************@phx.gbl...
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

.

Nov 20 '05 #5

This discussion thread is closed

Replies have been disabled for this discussion.

Browse more Visual Basic .NET Questions on Bytes