title: Set permission to read local XML file in C# for XAML browser app
body: <p>I have a XAML Browser Application that will eventually be placed on a server, however I am currently testing it from my Documents folder. I am trying to read from an XML document locally, but I am stuck at <code>XmlReader.Create();</code>
  When I tried to use my XML document, a SecurityException was thrown, so I tried to use the following to bestow read permission upon the XML file:</p>
  
  <pre><code>FileIOPermission fpa1 = new FileIOPermission(FileIOPermissionAccess.Read, @"C:\Users\User1\Documents\Visual Studio 2010\Projects\WpfBrowserApplication2\WpfBrowserApplication2\XMLDoc1.xml");
  xReader = XmlReader.Create(@"C:\Users\User1\Documents\Visual Studio 2010\Projects\WpfBrowserApplication2\WpfBrowserApplication2\XMLDoc1.xml"
  </code></pre>
  
  <p>The error message reads:</p>
  
  <pre><code>A first chance exception of type 'System.Security.SecurityException' occurred in mscorlib.dll
  Request for the permission of type 'System.Security.Permissions.FileIOPermission, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=[tokennumber]' failed.
  </code></pre>
  
  <p>Is FileIOPermission the correct class to use to enable read permission with an XmlReader?</p>