I'm trying to read an XML file.
string pagina = "https://ws.pagseguro.uol.com.br/v3/transactions/notifications/5B93AB-E9FA04FA04D8-24449BAF8A80-E32467?email=diegozanardo@yahoo.com.br&token=DFA3837517594466BCC87D8F397BF15F";
HttpWebRequest request = (HttpWebRequest)WebRequest.Create(new Uri(pagina));
request.Method = "POST";
request.ContentType = "application/xml";
request.Accept = "application/xml";
StreamWriter writer = new StreamWriter(request.GetRequestStream());
WebResponse res = request.GetResponse();
StreamReader sr = new StreamReader(res.GetResponseStream());
string returnvalue = sr.ReadToEnd();
XmlDocument xm = new XmlDocument();
xm.LoadXml(returnvalue);
XmlNodeList el = xm.GetElementsByTagName("paymentLink");
Response.Redirect(el[0].InnerText);
But it generates the following error in the line:
WebResponse res = request.GetResponse();
Additional information: The remote server returned an error: (405) Method Not Allowed.