If the server returns any response at all, then it must have been up. But I already said that, didn't I?
Perhaps your requirements are unclear. Perhaps "up" means something more specific than just running and responding to requests? If you're looking for a 200 response then you have to send a URL which the server can find.
Joined: Aug 09, 2009
Thanks for the reply Paul..
I was looking for 200 response because i get this response for all other URLs.
Because of authentication error, i must be missing 200. I am not sure how to get rid of 404.
As you have suggested, now i am checking for a response from the URL.
If the response is not empty, i am continuing with the rest of the code.