title: File Create() and WriteAllText() in single class throw exception,
body: <p>When I wtite a code like below one,</p>
  
  <pre><code>protected void Page_Load(object sender, eventAgrs e)
  {
    string xDoc ="Durgesh kumar rao";
    File.Create(Server.MapPath("~/XML"));
    File.WriteAllText(Server.MapPath("~/XML"), xDOC);
  }
  </code></pre>
  
  <p>This throw exception,</p>
  
  <blockquote>
    <p><em>The process cannot access the file, because it is being used by another process.</em></p>
  </blockquote>
  
  <p>Am I doing something wrong, or File Static Method preform security check i.e why it throws exception.</p>