Locking XML file in Web Application
问题 We have a website application which acts as a form designer. The form data is stored in XML file. Each form has it's own xml file. When i edit a form, i basically recreate the XML file. public void Save(Guid form_Id, IEnumerable<FormData> formData) { XDocument doc = new XDocument(); XElement formsDataElement = new XElement("FormsData"); doc.Add(formsDataElement); foreach (FormData data in formData) { formsDataElement.Add(new XElement("FormData", new XAttribute("Id", data.Id) new XAttribute(