httpwebrequest - The operation has timed out while reading xml file -


When I'm reading to convert a remote xml file (on HttpWebRequest.GetResponse) Section currency I am getting the following error is.

Method I (used TugberkUgurlu_CurConverter.ConverterClass.ConvertActionForTL) is reading an xml file and get no monetary value.

But suddenly, I started getting these errors. How can I stop them? ! Thank you

System.Net.WebException: operation generated time has expired Monday, Marc 28 2011 19:33:48 GMT

System.Net. WebException: System.et.HttpWebRequest.GetResponse ended system of System.Xml.XmlDownloadManager.GetNonFileStream on () on System.Xml.XmlDownloadManager.GetStream (URI URI, ICredentials credentials) system on System.Xml.XmlUrlResolver. Reading.CompilerServices.RuntimeHelpers.ExecuteCodeWithGuaranteedCleanup on System.Hreading.CompressedStack.RunTryCode (Object UserData) on System.Xml.XmlTextReaderImpl.OpenUrlDelegate (object xmlResolver) on .GetEntity (URI absoluteUri, string role, ObjectTotron Car) TryCode code, CleanupCode backoutCode, System.Threading.CompressedStack.Run (compressedStack compressedStack, ContextCallback callback, object state) System.Xml.XmlTextReaderImpl.OpenUrl on System.Xml.XmlTextReaderImpl.Read on System.Xml.XmlLoader (() ) On UserData object TugberkUgurlu_CurConverter.ConverterClass.ConvertActionForTL (CurrencyForTLConvert SelectCurrency, Decimal YourPriceToConvert) on System.Xml.XmlDocument.Load (XmlReader Reader) on Load (XML Document Reader, XMLRead Reader, Boolean Protected WipeSpace)

I do not see any problems with the file you linked to, and neither does XMLSpy.

You say that it is rarely a problem, and currency conversion value in the file, which is often likely to return may file sometimes bad?

Perhaps you should try to load the file as a text file first, and save it to disk. Then load the XmlDocument from the file on the disk like this, if it fails, you still have got to see the bad file.

Comments