Reputation: 21
When i try to get request client machine name using
System.Net.Dns.GetHostEntry(
Request.ServerVariables("remote_addr")
).HostName.Split(New [Char]() {"."c}) ,
then it gives me below error
System.Net.Sockets.SocketException: No such host is known
can any one please help me.
Upvotes: 0
Views: 2213
Reputation: 4750
a remote_addr ( client ip address ) entry in your server environment is not guaranteed to have a corresponding DNS entry.
Even if the address had an entry, the dns entry for the address might not be in the server DNS catalog and the server might have not found the entry via recursive lookup.
Upvotes: 1