|
-
March 8th, 2005, 12:43 AM
#1
Connecting through URL
How to connect using url instead of IP address..
I try using the url instead of IP but the error given is
The data at the root level is invalid, Line 1 position 1...
I even try to delete the "http://" and put in "anything.com.sg" but still cannot works the error is still the same...
Code:
Try
tcpC.Connect("http://anything.com.sg", 12345)
Catch e As Exception
Console.WriteLine(e.ToString())
End Try
Thanks
Last edited by toytoy; March 8th, 2005 at 12:48 AM.
-
March 8th, 2005, 04:23 AM
#2
Re: Connecting through URL
toytoy,
are you sure your url accepts connections to the specified port?
I use
Code:
tcpClient = New Net.Sockets.TcpClient()
Try
tcpClient.Connect("aaa.bbb.cc", 9112)
Catch m As Exception
MsgBox(m.ToString())
End Try
and it works fine.
Did it help? rate it.
The best conversation I had was over forty million years ago ... and that was with a coffee machine.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|