Hello,
Could someone here please explain the reason for the error in the
subject (the full error below)
I dont get this everytime and i've never gotten while debugging. The
code (also below)
which causes this is part of an ftp application (the guts of which i
got from some shared code)
that is scheduled to execute nightly.
Sometimes it will run for a few nights in a row without any problems
other times it just fails with that error. Please help.
Full error:
System.Net.Sockets.SocketException: The requested name is valid, but
no data of the requested type was found at
System.Net.Dns.GetHostByName(String hostName) at
System.Net.Dns.Resolve(String hostName) at
SenecaFTP.FtpClient.Login()
Offending code:
this.clientSocket = new
Socket( AddressFamily.InterNetwork,SocketType.Stream,
ProtocolType.Tcp );
addr = Dns.Resolve(this.server).AddressList[0]; -- failure point.
Ignacio Machin ( .NET/ C# MVP ) - 25 Jun 2007 14:22 GMT
Hi,
It seems an error with the Resolver. I have never seen this error before (I
do have several similar nightly jobs).
Why dont you do a search in a networking NG ;it does not have to be of .NET
I bet that this error comes from the unmanaged side.
> Hello,
> Could someone here please explain the reason for the error in the
[quoted text clipped - 21 lines]
> ProtocolType.Tcp );
> addr = Dns.Resolve(this.server).AddressList[0]; -- failure point.
Tom Spink - 25 Jun 2007 19:09 GMT
> Hello,
> Could someone here please explain the reason for the error in the
[quoted text clipped - 21 lines]
> ProtocolType.Tcp );
> addr = Dns.Resolve(this.server).AddressList[0]; -- failure point.
Hi,
The error (to me) suggests a DNS resolution problem, i.e. the DNS server was
contacted successfully, but was unable to provide any DNS records for the
host, perhaps because the DNS server is not authoritative for the domain
and no cache records exist, or perhaps an inherent problem with the DNS
server itself.
If you can, try changing your DNS server to something else and run the tests
again.

Signature
Tom Spink
University of Edinburgh
Christof Nordiek - 26 Jun 2007 08:15 GMT
> Hello,
> Could someone here please explain the reason for the error in the
> subject (the full error below)
<snip>
> Offending code:
>
> this.clientSocket = new
> Socket( AddressFamily.InterNetwork,SocketType.Stream,
> ProtocolType.Tcp );
> addr = Dns.Resolve(this.server).AddressList[0]; -- failure point.
"The requested name is valid,"
I guess this means, the given name is a syntactically correct DNS-name.
"but no data of the requested type was found."
The name couldn't be resolved, because there is no entry in the responsible
DNS-server
Since I guess the server name is configured, and so it is unlikely, that it
can't be resolved occasionally, maybe it is a problem connecting the
DNS-Server.
Christof