我有一个应用程序在 Windows 7 下无法进行 DNS 查找 (System.Net.Dns.GetHostEntry)。该应用程序在 XP 下运行良好。
正在生成的错误是套接字错误代码 11003:
WSANO_RECOVERY 11003
This is a nonrecoverable error. This indicates that some sort of nonrecoverable error occurred during a database lookup. This may be because the database files (for example, BSD-compatible HOSTS, SERVICES, or PROTOCOLS files) could not be found, or a DNS request was returned by the server with a severe error.
特别有趣的是,该进程直接从网络共享运行。如果我在 Win 7 下本地运行它,它工作正常。
我已经在所有版本的 caspol(32 位和 64 位)下完全信任网络位置。
是否有任何其他 .NET 或 Windows 7 安全设置可以阻止从网络共享位置运行的进程进行 DNS 查找?
最佳答案
原来是这个 是 卡斯波尔
但是在 Windows 7 上,仅仅在管理员组中是不够的。
您还必须右键单击 .NET 命令提示符快捷方式并选择“以管理员身份运行”以绕过 UAC。
然后正常的 caspol 命令将起作用。
关于.NET 进程在 Windows 7 中无法进行 DNS 查找,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/4368877/