I am saving an XML file using the following code.
XmlSerializer serializer = new XmlSerializer(submitOrder.GetType());
using (FileStream fs = new FileStream(filePath, FileMode.Create))
{
serializer.Serialize(fs, submitOrder);
}
Submit order is the C# DTO class. If my file path is protected, how can I provide user name and password when saving the XML