是否有一个c#库可用于解析特定DNS服务器上的主机名,而无需更改网卡上已注册的DNS服务器? [英] Is there a c# library available to resolve a hostname on a specific DNS server without changing the registered DNS servers on the network card?

查看:129
本文介绍了是否有一个c#库可用于解析特定DNS服务器上的主机名,而无需更改网卡上已注册的DNS服务器?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在研究网站的故障转移以及将流量从旧盒子重定向到新盒子的一种触发机制.当前的主要IIS框可能会脱机,我们不知道确切的返回时间,并且随着人们的浏览器将框IP缓存在一起,他们可能仍会转到旧框.每个服务器工具包都在外部托管,它们具有自己的DNS服务器,该DNS服务器与包含公共网站DNS条目的DNS服务器不同.因此,更改公共DNS条目的时间最多不会在托管公司的DNS服务器上注册十分钟.我至少在考虑编写一个过程,使其位于每个IIS服务器上,以专门针对公共DNS服务器为目标,以立即检测IP分辨率更改并将脱机框IIS条目重定向到脱机页面.我无法找到合适的示例来联系特定的DNS服务器并解析主机名.我意识到整体架构中可能存在缺陷,因此重定向应该在外部主机级别而不是在互联网云级别进行,但是目前我似乎仍然停留在前者上.感谢您的帮助.

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.

推荐答案

文章 DNS. NET解析器(C#) [ ^ ]可能会有所帮助,因为解析器似乎可以接受任何DNS服务器.
The article DNS.NET Resolver (C#)[^] might be of help, as it seems that the resolver accepts any DNS-servers.


这篇关于是否有一个c#库可用于解析特定DNS服务器上的主机名,而无需更改网卡上已注册的DNS服务器?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆