Click here to Skip to main content
15,907,497 members
Please Sign up or sign in to vote.
4.00/5 (1 vote)
See more:
I am looking into failover of a website and redirection of traffic from the old box to the new box as a kind of flip flop mechanism. The current primary IIS box could go offline and we dont know precisely when it comes back and with people's browsers caching the boxs IP they may still be going to the old box. Each servers kit is externally hosted and they have their own DNS servers which are different to the DNS servers containing the public website DNS entries. So changing the public DNS entries is not registered on the hosting companies DNS servers for up to ten minutes. I was at least thinking of writing a process to sit on each IIS server to specifically target the public DNS server to instantly detect the IP resolution change and redirect the offline box IIS entries to an offline page. I have not been able to find a suitable example for contacting a specific DNS server and resolving a hostname. I realise there may be flaws in the overall architecture such that redirection should be taking place at the external host level rather than the internet cloud level but I seem to be stuck with the former at the moment. Thanks for any help.

1 solution

The article DNS.NET Resolver (C#)[^] might be of help, as it seems that the resolver accepts any DNS-servers.
Share this answer

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900