Third part socket connection
Posted: Wed Aug 31, 2011 8:51 pm
I'm trying to connect to my station from a service that I am creating. I want to store the data, in a SQL database for reporting and analysis.
I've configured my router to forward ports 7777, 5558, and 5559. On any of these ports, I can connect and view the data via a web browser. However, when I connect via a socket from a C# application, I either get a timeout, rejected by the host, or nothing at all.
I've tried the following various GET strings to receive the data, but nothing seems to work:
string Get = "GET http://MyIPAddress:7777/meteolog.cgi?type=xml&mode=data";
string Get = "GET http://MyIPAddress HTTP/1.1";
string Get = "GET MyIPAddress:7777/meteolog.cgi?type=xml&mode=data HTTP/1.1";
string Get = "GET http://MyIPAddress HTTP/1.1";
string Get = "GET MyIPAddress:7777 HTTP/1.1\r\nHost: /meteolog.cgi?type=xml&mode=data";
Any help would be greatly appreciated. Thank you.
I've configured my router to forward ports 7777, 5558, and 5559. On any of these ports, I can connect and view the data via a web browser. However, when I connect via a socket from a C# application, I either get a timeout, rejected by the host, or nothing at all.
I've tried the following various GET strings to receive the data, but nothing seems to work:
string Get = "GET http://MyIPAddress:7777/meteolog.cgi?type=xml&mode=data";
string Get = "GET http://MyIPAddress HTTP/1.1";
string Get = "GET MyIPAddress:7777/meteolog.cgi?type=xml&mode=data HTTP/1.1";
string Get = "GET http://MyIPAddress HTTP/1.1";
string Get = "GET MyIPAddress:7777 HTTP/1.1\r\nHost: /meteolog.cgi?type=xml&mode=data";
Any help would be greatly appreciated. Thank you.