gelnd
Newcomer
I'm using the HttpWebRequest object to retrieve a web page from the Internet. The program I created runs continuously requesting the page every so often. This works fine. The problem occurs when the DNS record for the domain of the website I'm requesting the page from is changed. If the domain is assigned a new IP address the HttpWebRequest object keeps requesting the page from the old IP address. The HttpWebRequest object is created and destroyed every time the page is requested. I can use the GetHostByName method of the DNS object to lookup the IP address for the domain in the code just prior to the HttpWebRequest being created and it brings back the new IP address like expected. If I stop the program and restart it then the HttpWebRequest object will use the new IP address as well.
Does the DNS info get cached somewhere? How can I get the HttpWebRequest object to pickup the change in the DNS record without restarting the program?
Any thoughts would be appreciated
Does the DNS info get cached somewhere? How can I get the HttpWebRequest object to pickup the change in the DNS record without restarting the program?
Any thoughts would be appreciated