This project has moved. For the latest updates, please go here.

System.ObjectDisposedException: Cannot access a closed Stream.

Topics: Developer Forum
Feb 18, 2011 at 12:07 AM

Hi there,

I am getting the following error which I would like to avoid if possible. Returning form the RssDocumentBase.Load. Any ideas?

System.ObjectDisposedException: Cannot access a closed Stream. at System.IO.__Error.StreamIsClosed() at System.IO.MemoryStream.Read(Byte[] buffer, Int32 offset, Int32 count) at System.Xml.XmlTextReaderImpl.ReadData() at System.Xml.XmlTextReaderImpl.ParseText(Int32& startPos, Int32& endPos, Int32& outOrChars) at System.Xml.XmlTextReaderImpl.ParseText() at System.Xml.XmlTextReaderImpl.ParseElementContent() at System.Xml.XmlTextReaderImpl.Read() at System.Xml.XmlTextReader.Read() at System.Xml.XmlWriter.WriteNode(XmlReader reader, Boolean defattr) at System.Xml.XmlReader.ReadOuterXml() at RssToolkit.Rss.RssXmlHelper.ConvertToRssXml(XmlReader reader) at RssToolkit.Rss.RssDocumentBase.Load[T](XmlReader reader) at RssToolkit.Rss.RssDocumentBase.Load[T](Uri url) at MyProject.AdGenerator.Core.RssFeeds.TradingRepository.Load(Uri url) at MyProject.AdGenerator.ApplicationServices.RssManagementService.getRssFeed(String uri) at MyProject.AdGenerator.Web.Controllers.RssController.Trading(Int32 id)