title: C# XmlWriter.Create() - Access to path denied
body: <p>I want to write a new XML file to disk but the following code gives an error.</p>
  
  <pre><code>static void Main(string[] args)
          {
              using (XmlWriter writer = XmlWriter.Create(@"C:\abc.xml"))
              {
                  writer.WriteStartDocument();
                  writer.WriteStartElement("Employees");
                  writer.WriteEndElement();
                  writer.WriteEndDocument();
              }            
  
              Console.ReadKey();       
         }
  </code></pre>
  
  <p>Can anybody help me with this?</p>
  
  <p>Note: abc.xml does not already exist.</p>