C# Silverlight - XmlDictionary from Uri
Posted
by
Robert White
on Stack Overflow
See other posts from Stack Overflow
or by Robert White
Published on 2012-06-30T20:56:30Z
Indexed on
2012/06/30
21:16 UTC
Read the original article
Hit count: 362
I've been developing a Silverlight application for a company's website and have encountered a problem.
Up until now I have been programming this locally, now I need to publish the program onto the website; the issue is that FileStream can only access local files with elevated permissions.
Here's a snippet of code:
using (FileStream fileStream = new FileStream(@"E:\Users\LUPUS\Documents\Visual Studio 2010\Projects\Lycaon5\Lycaon5\acids.xdb", FileMode.Open))
{
using (XmlDictionaryReader reader = XmlDictionaryReader.CreateTextReader(fileStream, XmlDictionaryReaderQuotas.Max))
{
//Read the XML file out.
}
}
Without changing anything to do with XmlDictionaryReader reader - How could I go about reading the files from a relative Uri?
Many Thanks,
Rob.
P.s. Apologies for the lack of formatting, me cave man, me don't know how.
© Stack Overflow or respective owner