title: Windows Azure - Access Denied in approot path
body: <p>I am trying to open a file (included in my project as Content and Copy Always options) using a FileStream. I am getting the following error:</p>
  
  <pre><code>***Access to the path 'E:\approot\PdataParsingRules.xml is denied.***
  </code></pre>
  
  <p>I am using the below code to get the path of my file:</p>
  
  <pre><code>Path.Combine(Environment.GetEnvironmentVariable("RoleRoot") + @"\", @"approot\PdataParsingRules.xml");
  </code></pre>
  
  <p>And I am using the below code to de serialize my file:</p>
  
  <pre><code>ParsingRules rules;
  XmlSerializer serializer = new XmlSerializer(typeof(ParsingRules));
  fileStream = new FileStream(rulePath, FileMode.Open);
  rules = (ParsingRules)serializer.Deserialize(fileStream);
  return rules;
  </code></pre>
  
  <p>When I do an RDC to one of my worker role instances (running in full trust mode), I see that this particular file has Read, Read &amp; Execute rights for regular users in that VM. Admin and System have full control on the file. My de serialization works fine if I manually give full rights to regular users but that doesn't solve the problem for obvious reasons.</p>
  
  <p>Any ideas on this would be greatly appreciated.</p>