本文介绍了.NET进程无法使用Windows 7进行DNS查找的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个在Windows 7下无法进行DNS查找的应用程序(System.Net.Dns.GetHostEntry).该应用程序在XP下可以正常工作.

I have an application that is failing DNS lookup (System.Net.Dns.GetHostEntry) under windows 7. This application works fine under XP.

正在生成的错误是套接字错误代码11003:

The error being generated is socket error code 11003:

特别有趣的是,此过程直接从网络共享运行.如果我在Win 7下本地运行它,则可以正常工作.

What is particularly interesting, is that this process is running directly from a network share. If I run it locally under Win 7, it works fine.

在所有版本的caspol(32位和64位)下,我都已完全信任网络位置.

I have given the network location full trust under all versions of caspol (32 bit & 64bit).

是否有其他.NET或Windows 7安全设置阻止通过网络共享位置运行的进程进行DNS查找?

Is there any other .NET or Windows 7 security setting that prevents DNS lookups by processes running from network shared locations?

推荐答案

显示此级联.

但是在Windows 7上,仅位于Administrators组中是不够的.

But on Windows 7, just being in the Administrators group is not enough.

您还必须右键单击.NET Command Prompt快捷方式,然后选择以管理员身份运行"以绕过UAC.

You also have to right click the .NET Command Prompt shortcut and pick "Run as Administrator" to bypass UAC.

然后正常的caspol命令将起作用.

Then normal caspol commands will work.

这篇关于.NET进程无法使用Windows 7进行DNS查找的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-01 20:10