Response.GetResponseStream() is returning xml with escape characters
<?xml version=\"1.0\" encoding=\"utf-8\"?>
Because of this XmlReader return {None}. Help please?
HttpWebRequest req = (HttpWebRequest)HttpWebRequest.Create(url);
req.Accept = "*/*"; req.Headers.Add("UA-CPU", "x86");
req.UserAgent = "Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.0; MS-RTC LM 8)"; HttpWebResponse resp = (HttpWebResponse)req.GetResponse(); XmlTextReader xRead = new XmlTextReader(resp.GetResponseStream());
xRead is {None} if I the call is from client Script Web Service call. When I check the response stream using a StreamReader
StreamReader reader = new StreamReader(resp.GetResponseStream()
return reader.ReadToEnd()
I see the escape characters
<?xml version=\"1.0\" encoding=\"utf-8\"?>