Click to See Complete Forum and Search --> : XML HttpWebresponse


balamurali_g
March 8th, 2007, 05:45 PM
I could'nt download a xml httpwebresponse in my system(Vista- do'nt know if thats the issue) ,but can do the same in another system (with XP).
The code is :

public void Send()
{
String body = "";
TextReader inputfile = new StreamReader(@"C:\\NVMSOrderStatus\XMLFileRetrieve\OrderRetrieveData.xml");
body = inputfile.ReadToEnd();

HttpWebRequest myRequest = (HttpWebRequest)WebRequest.Create("http://exchange.nvms.com/Get.asp");
myRequest.Method = "POST";
StreamWriter s = new StreamWriter(myRequest.GetRequestStream(),Encoding.ASCII);
s.Write(body);
s.Close();
WebResponse myResponse = myRequest.GetResponse();
StreamReader sr = new StreamReader(myResponse.GetResponseStream(), System.Text.Encoding.ASCII);
TextWriter outputfile = new StreamWriter(@"C:\\NVMSOrderStatus\OrderDataRetrieveResponse\OrderDataRetrieveResponse.xml");
while (!sr.EndOfStream)
{
outputfile.WriteLine((sr.ReadLine()).ToString());
}
outputfile.Close();
sr.Close();
myResponse.Close();
}


I checked switching off my Firewall also,still did'nt work. Any suggestions?
Thanks in advance.

Charu0306
March 9th, 2007, 05:57 AM
Yes, VISTA could have problems with VS as such although its got .NET framework.

Here's a small list of its problems:

http://msdn2.microsoft.com/en-us/vstudio/aa964140.aspx