KEVaholic00
12-16-2006, 09:39 PM
I'm trying to make a server in visual basic 2005 that I can connect to with a client (also made in VB2005) to download files from the server's computer to whatever computer I'm using the client on. I know I know, this could be done with a simple FTP server, but I was more or less focusing on making my own system. :)
Anyway, I'm using the System.Net.Sockets TcpListener and TcpClient objects to communicate back and forth. However I can't even get the simple act of a connection between the two to succeed.
I have an error handler on the server that will report all errors to the console. This is the error I get on the server end, instantly after I connect using the client:
C:\FileServer>fileserver
Server started.
An error has occurred.
Number: 5
Source: System
Last line executed: 0
Description: A request to send or receive data was disallowed because the so
cket is not connected and (when sending on a datagram socket using a sendto call
) no address was supplied
On the client end I simply get an "unhandled exception" message because I haven't defined a handler.
Anyway. . . does anyone know the problem? I'll attach my source code. Note: the client isn't fully finished. I'm simply trying to establish a connection at this point - then when that works I'll go from there.
Anyway, I'm using the System.Net.Sockets TcpListener and TcpClient objects to communicate back and forth. However I can't even get the simple act of a connection between the two to succeed.
I have an error handler on the server that will report all errors to the console. This is the error I get on the server end, instantly after I connect using the client:
C:\FileServer>fileserver
Server started.
An error has occurred.
Number: 5
Source: System
Last line executed: 0
Description: A request to send or receive data was disallowed because the so
cket is not connected and (when sending on a datagram socket using a sendto call
) no address was supplied
On the client end I simply get an "unhandled exception" message because I haven't defined a handler.
Anyway. . . does anyone know the problem? I'll attach my source code. Note: the client isn't fully finished. I'm simply trying to establish a connection at this point - then when that works I'll go from there.