.NET process error when looking up DNS using Windows 7

I have an application that does not search for DNS (System.Net.Dns.GetHostEntry) under windows 7. This application works fine under XP.

The error is generated: socket error code 11003:

WSANO_RECOVERY 11003
This is a fatal error. This indicates that some fatal error occurred while searching the database. This may be because the database files (for example, BSD-enabled files, services or PROTOCOLS files) cannot be found or the DNS query was returned by the server with a serious error.

What is especially interesting is that this process runs directly from a network resource. If I run it locally under Win 7, it works fine.

I gave full trust to the network in all versions of caspol (32 bits and 64 bits).

Is there any other .NET or Windows 7 security setting that prevents processes from finding DNS from network shares?

+7
windows-7
source share
4 answers

The output of this was caspol.

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

You also need to right-click the .NET command prompt shortcut and select "Run as administrator" to bypass UAC.

Then the usual caspol commands will be executed.

+2
source share

You have a similar problem connecting to SQL Server through a .NET application running from a network share.

As of Win7 / 2008, you should read the "List Content List" in each folder from the application’s shared folder. If the staging folder exists without any permissions, the connection is not made.

Powered by XP.

+1
source share

If you pass an IP address, it is worth noting that by default it uses IPv6 and, according to the documentation, will throw an exception .

My suggestion is to get an IPv4 address using the following code:

IPAddress ipv4 = Dns.GetHostAddresses(address).Where(x=>x.AddressFamily == AddressFamily.InterNetwork).FirstOrDefault(); 
0
source share

Well, to easily check if your DNS is configured correctly, add a separate html page to the root directory. If this page displays as expected, dns is fine.

Everyone has their own way to test things, which is ideal, because we can share our experience. I like to put a bit of my code / page on the server related to what I want to execute one bit at a time.

Hope this helps ...

0
source share

All Articles