I'm modifying some C# code that queries http://checkip.dyndns.com/ and derives the external IP from the sites HTML response. However, this specific site has a tendency to timeout and at times accessing it in Chrome or any browser may generate a connection reset error. This causes the program I'm modifying to fail intermittently when performing one of its primary network configuration tasks.
Falling back on my high school CCNA training though, I have considered two possible solutions.
- Extending the timeout period when querying the site for the local machines external IP.
This solution seems ideal, because I am not aware of a better site to use in terms of simplicity of response and I'd rather not deal with the extra work of modifying the code that interprets the http response and scrapes the IP. It does however present the issue that I'm not exactly sure how I might go about doing this or what keywords to look for in the source. As it is not my project, I am not entirely familiar with the program architecture. If anyone has any suggestions the source can be found here: http://littlegreatideas.com/procrastineering/files/videochatrobot/VideoChatRobot_v02.zip
Opening the project file and simply Ctrl-F'ing for the URL: http://checkip.dyndns.com/ will yield some of the relevant code.
- Changing sites to query a different, more responsive site. Thus, also changing the scraping code, which is not ideal in my mind, but would not be bad experience either.
Thanks beautiful people, the help is much appreciated!