There is an error occur when editing datas in xml in Live site.The error is like as follows.Please help me to solve this problem
Source Error:
|
|
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Suthish NairPosted Oct 7, 2010, 6:58 AM
string strDataDirectory = AppDomain.CurrentDomain.GetData("DataDirectory").ToString();
string appdatafolder = Path.Combine(HttpContext.Current.Request.PhysicalApplicationPath, "App_Data");
Server.MapPath("~/App_Data/filename/1.xml");
HttpContext.Current.Server.MapPath("~/App_Data/filename/1.xml");
HttpContext.Current.ApplicationInstance.Server.MapPath("~/App_Data/folder/")
Koteswararao MallisettiPosted Oct 7, 2010, 2:39 AM
xDoc.Save (Server.MapPath("App_Data//XmlFolder//Events.xml"));
in the same way i get success
this is my code.
doc.Save(Server.MapPath("XmlDataFiles//SmtpSettings.xml"));