COMException was unhandled by user code(Exception from HRESULT: 0xC00CE508) win8 metro apps

0

I'm writing a little application on WinRT Metro Apps. I need to read an xml file and i get a awful COMException :/

This is which should read this xml:

Windows.Storage.StorageFolder storageFolder = await
   Windows.ApplicationModel.Package.Current.InstalledLocation
   .GetFolderAsync("Common");

Windows.Storage.StorageFile storageFile = await
   storageFolder.GetFileAsync("testFile.xml");

var stream = await storageFile.OpenAsync(Windows.Storage.FileAccessMode.Read);

XmlDocument doc = await XmlDocument.LoadFromAsync(storageFile);

Can somebody give me somes tips to make it work?

com
windows-8
microsoft-metro
windows-runtime
xmlreader
asked on Stack Overflow Apr 19, 2012 by Kamael90

1 Answer

0

Why do you use OpenAsync()? (Further more, doesn't the method named LoadFromAsync exist?) Please see this Web page: How to read and write data into XML file In Metro style apps ?

By the way, error 0xC00CE508 occurs in many cases, while parsing XML. Please check that the contents of the XML have no error, by using the XmlDocument.LoadXml(String) method.

answered on Stack Overflow Apr 19, 2012 by biac • edited Apr 19, 2012 by Kemal Fadillah

User contributions licensed under CC BY-SA 3.0