Hello, I'm an ASP.NET developer and I'm trying to capture the XML return from the Reverse Phone link. I got the error above (596) when calling GetResponse(). Please advice. Below is the code:
-=-*************-=- ASPX code behind WebRequest req = null; WebResponse rsp = null; try { string filename = Server.MapPath("test.xml"); string uri = "http://api.whitepages.com/reverse_phone/1.0/?phone=8059373555;api_key=######"; req = WebRequest.Create(uri); req.Method = "POST"; req.ContentType = "text/xml";
StreamWriter writer = new StreamWriter(req.GetRequestStream()); rsp = req.GetResponse(); // <=== ERROR occured here (596) ===> StreamReader stream = new StreamReader(rsp.GetResponseStream()); string responseString = stream.ReadToEnd(); stream.Close(); } catch { }
-=-*************-=-
Thank you in advance D-Veloper
Message edited by D-Veloper 11 months ago
Please sign in to add a post.
Hello, I'm an ASP.NET developer and I'm trying to capture the XML return from the Reverse Phone link. I got the error above (596) when calling GetResponse(). Please advice. Below is the code:
-=-*************-=- ASPX code behind WebRequest req = null; WebResponse rsp = null; try { string filename = Server.MapPath("test.xml"); string uri = "http://api.whitepages.com/reverse_phone/1.0/?phone=8059373555;api_key=######";
req = WebRequest.Create(uri); req.Method = "POST"; req.ContentType = "text/xml";
-=-*************-=-
Thank you in advance D-Veloper
Message edited by D-Veloper 11 months ago