Update dyndns
-
I m writing code for updae the dyndns for my webcam I m using this code to implement this task
Private Sub dyndnsupdate(ByVal ip As String) Try Dim data(1024) As Byte Dim response As String = "" Dim count As Integer Dim socket As New Socket(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp) Dim host As IPHostEntry = System.Net.Dns.Resolve("professionalbkn.dyndns.org") Socket.Connect(DirectCast((New IPEndPoint(host.AddressList(0), 80)), EndPoint)) If Not Socket.Connected Then Throw New Exception("Can´t connect to dyndns service") End If Dim request As String = "GET /nic/update?" + "system=dyndns" + "&hostname=" + _ Me.hostName + "&myip=" + "&wildcard=" + "ON" + _ "&offline=NO " + "HTTP/1.1" & Chr(13) & "" & Chr(10) & "" + _ "Host: members.dyndns.org" & Chr(13) & "" & Chr(10) & "" + _ "Authorization: Basic " + Me.userID + _ ":" + Me.password + "" & Chr(13) & "" & Chr(10) & "" + _ "User-Agent: .net dyndns client" & Chr(13) & "" & Chr(10) & "" & Chr(13) & "" & Chr(10) & "" count = Socket.Send(System.Text.UnicodeEncoding.ASCII.GetBytes(Request)) count = Socket.Receive(Data) While Not count = 0 Response += System.Text.ASCIIEncoding.ASCII.GetString(Data, 0, count) count = Socket.Receive(Data) End While Socket.Shutdown(SocketShutdown.Both) Socket.Close() Response = Response.Substring(Response.IndexOf("\r\n\r\n") + 4)
But it gives error that :HTTP/1.1 404 Not Found
Server: Unknown/0.0 UPnP/1.0 Web Server
Connection: close404 Not Found
Hope some one can understand my problem & will help to solve this problem Thanks with anticipation
The Great Pleasure In Doing That Things That Other People Say U Can't By Doing This U Can Shut Their Mouth
-
I m writing code for updae the dyndns for my webcam I m using this code to implement this task
Private Sub dyndnsupdate(ByVal ip As String) Try Dim data(1024) As Byte Dim response As String = "" Dim count As Integer Dim socket As New Socket(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp) Dim host As IPHostEntry = System.Net.Dns.Resolve("professionalbkn.dyndns.org") Socket.Connect(DirectCast((New IPEndPoint(host.AddressList(0), 80)), EndPoint)) If Not Socket.Connected Then Throw New Exception("Can´t connect to dyndns service") End If Dim request As String = "GET /nic/update?" + "system=dyndns" + "&hostname=" + _ Me.hostName + "&myip=" + "&wildcard=" + "ON" + _ "&offline=NO " + "HTTP/1.1" & Chr(13) & "" & Chr(10) & "" + _ "Host: members.dyndns.org" & Chr(13) & "" & Chr(10) & "" + _ "Authorization: Basic " + Me.userID + _ ":" + Me.password + "" & Chr(13) & "" & Chr(10) & "" + _ "User-Agent: .net dyndns client" & Chr(13) & "" & Chr(10) & "" & Chr(13) & "" & Chr(10) & "" count = Socket.Send(System.Text.UnicodeEncoding.ASCII.GetBytes(Request)) count = Socket.Receive(Data) While Not count = 0 Response += System.Text.ASCIIEncoding.ASCII.GetString(Data, 0, count) count = Socket.Receive(Data) End While Socket.Shutdown(SocketShutdown.Both) Socket.Close() Response = Response.Substring(Response.IndexOf("\r\n\r\n") + 4)
But it gives error that :HTTP/1.1 404 Not Found
Server: Unknown/0.0 UPnP/1.0 Web Server
Connection: close404 Not Found
Hope some one can understand my problem & will help to solve this problem Thanks with anticipation
The Great Pleasure In Doing That Things That Other People Say U Can't By Doing This U Can Shut Their Mouth