I'm currently trying to write a XML file in ASP.Net (see code below). It is not the writing that doesn't work, but when I run the code, it returns an error: `Access to the path 'C:\Program Files\IIS Express\devices.xml' is denied.`

This is not the directory of my project, so I don't know why it's trying to save the XML right there.

If this is the problem of the error, how do I make sure the XML is saving to my project root? Else, what is wrong here and what do I have to do?

**Code**

```
ArrayList devices = new ArrayList();
devices.Add(new Device());

XmlTextWriter writer = new XmlTextWriter("devices.xml", Encoding.UTF8);
writer.WriteStartDocument();

foreach(Device device in devices)
{
    writer.WriteStartElement("device");

    writer.WriteStartElement("name");
    writer.WriteString(device.name);
    writer.WriteEndElement();

    writer.WriteEndElement();
}

writer.WriteEndDocument();
writer.Close();

```