c# - save xml to xmlfile -


xelement xml2 = new xelement("topmenus", b in dc.topmenuu() select new xelement("topmenu", new xelement("id", b.id), new xelement("title", b.title), new xelement("parent_fk", b.parent_fk), new xelement("pageurl", b.pageurl)));     xml2.save(server.mappath(".") + "\\xml\\topmenu.xml");// line error 

results in error:

the process cannot access file 'c:\inetpub\wwwroot\iranfairnew\xml\topmenu.xml' because being used process.

this error while simultaneously looking @ browser ie, , mozilla can run program asp.net 3.5

how can solve problem?

use process explorer check nothing using file. looks file in use


Comments

Popular posts from this blog

php - How can I edit my code to echo the data of child's element where my search term was found in, in XMLReader? -

javascript - Iterate over array and calculate average values of array-parts -

jQuery Ajax Render Fragments OR Whole Page -