What is the query you're injecting into the WebRequest.Create method?
I assume it's a url, which it should be getting the host automatically from. Try setting the host manually:
Code:
HttpWebRequest request = (HttpWebRequest)WebRequest.Create(query);
request.host = "remote_server_name";
HttpWebResponse response = (HttpWebResponse)request.GetResponse();
If that still doesn't work, then it could be an issue with your IIS configuration or web.config.
“The best thing about a boolean is even if you are wrong, you are only off by a bit.”