string url = "http://foo.com/bar?id=" + id + "&more=" + more;
HttpWebRequest request = (HttpWebRequest)WebRequest.Create(url);
HttpWebResponse response = (HttpWebResponse)request.GetResponse();
I m trying make a call to another server, and getting back the following:
|FATAL|The remote server returned an error: (406) Not Acceptable. (REF #1)
System.Net.WebException: The remote server returned an error: (406) Not Acceptable.
Why am i getting this error? and how to fix this?
According to the RFC
Review the accept headers that your request is sending , and the content server in that URL ; )
BONUS
To see the accept headers: browse to
the URL and use FireBug (HTML tab).
To set the accept headers into your
request use the HttpWebRequest
Members.