Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I have a simple ping app made in C#. the only thing it does is pinging a host. when I'm running it on my local computers, it works in the way it should, but once I'm moving it to my server, it works weird: when pinging not existing host (even trying to resolve its DNS), it pings the server it is started on. more over, standard ping command acts the same way. Question: why does it resolve DNS in this way? I want to ping an actual host if that does exist, and get a message if it does not exist instead of pinging the server.

Server is running under MS win 2008, with IIS and MS DNS server installed on it. Am I getting this problem because of DNS server?

share|improve this question

migrated from stackoverflow.com Nov 28 '11 at 2:50

This question came from our site for professional and enthusiast programmers.

closed as not a real question by Ward, EEAA, Chris S, joeqwerty, MikeyB Nov 28 '11 at 4:27

It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.If this question can be reworded to fit the rules in the help center, please edit the question.

    
This isn't really a programming question. –  BNL Nov 28 '11 at 2:20
2  
It's not really a question at all. –  Ward Nov 28 '11 at 2:55
    
No details, no code. Provide teh codez!!! –  MikeyB Nov 28 '11 at 4:28

1 Answer 1

This is a programming problem. Your program is pinging 0.0.0.0, which the computer is correctly interpreting to mean "Any IP on the local computer". The program apparently is not checking for failed DNS resolution and is pinging away at the null address.

share|improve this answer
    
ok, Dns.GetHostEntry(host) returns server's IP address as a result. the second confusing thing is standard ping cmd works in the same way. –  Alex D Nov 28 '11 at 8:28

Not the answer you're looking for? Browse other questions tagged or ask your own question.