Hi There;
Cutting this down to bare bones I have a aspx page (.Net 3.5 running at localhost under IIS 7) with the following:
CODE
protected void Page_Load(object sender, EventArgs e)
{
HttpWebRequest request = WebRequest.Create("http://where.yahooapis.com/v1/place/1/children?appid=[myAppId]) as HttpWebRequest;
using (HttpWebResponse response = request.GetResponse() as HttpWebResponse)
{
myxml.DocumentContent = response.GetResponseStream().ToString();
}
}
I have checked the URL in a browser and it works fine, (with myAppId replaced). But when this code runs in my aspx page the error returned is:
QUOTE
The remote server returned an error: (406) Not Acceptable.
With the error in the line:
CODE
using (HttpWebResponse response = request.GetResponse() as HttpWebResponse)
Can anyone help me to see what's wrong with this?
Thanks in advance;
-Pete