Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Languages / C# / June 2007

Tip: Looking for answers? Try searching our database.

occasional "The requested name is valid, but no data of the requested type was found"

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
martin - 25 Jun 2007 13:43 GMT
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

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.