[Mono-bugs] [Bug 385638] New: Sharing violation on path when saving XDocument

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Thu May 1 12:19:22 EDT 2008


https://bugzilla.novell.com/show_bug.cgi?id=385638


           Summary: Sharing violation on path when saving XDocument
           Product: Mono: Class Libraries
           Version: 1.9.0
          Platform: 32bit
        OS/Version: Windows Vista
            Status: NEW
          Severity: Normal
          Priority: P5 - None
         Component: Sys.XML
        AssignedTo: atsushi at ximian.com
        ReportedBy: rodrifom at gmail.com
         QAContact: mono-bugs at lists.ximian.com
          Found By: ---


I have an asp.net website. I am using XLinq to edit and save a xml document.
When I try to save an open document in the same filepath I get this error:
System.IO.IOException: Sharing violation on path
C:\workspace\Xp\web\App_Data\data.xml

Steps to reproduce:
Open a xml document with System.Xml.Linq.XDocument.Load()
Save the document with System.Xml.Linq.XDocument.Save() updating the source
file.


Code example:
string dataFile = HttpContext.Current.Request.MapPath("~/App_Data/data.xml");

XDocument xdoc = XDocument.Load(dataFile);
xdoc.Save(HttpContext.Current.Request.MapPath("~/App_Data/data.xml"));

Note:
It works fine with MS Asp.Net Development Server


-- 
Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.


More information about the mono-bugs mailing list