hi, when i try to output the values within a xml from an url in a console window, it stucks at xml.Read(); for about 20 seconds, however, i sent the test build to a friend, and it only takes 1 sec for him, what could possibly be the cause of this prolonged delay?
code snip:
Code:string partialurl = "http://statapi.transformice.com/miceinfo.xml?n="; Console.Write("Name: "); string mousename = Console.ReadLine(); string fullurl = partialurl + mousename; Console.Write("URL will be: "); Console.WriteLine(fullurl); XmlTextReader xml = new XmlTextReader(fullurl); xml.Read(); // Hangs at this location! xml.ReadStartElement("mice"); xml.ReadStartElement("name"); Console.Write("Name: "); Console.WriteLine(xml.ReadString()); xml.ReadEndElement();


Reply With Quote

Bookmarks