[英]URI formats are not supported in c#
我正在嘗試將數據插入到xml文件中。 xml文件的位置路徑: http://AutoCompleteInGridView%20new1/Design/Pro/pricelist.xml
。 插入我的數據時,出現錯誤URI formats are not supported
。 它顯示參數異常未處理。我想將我的xml文件保存在server system
這些URL屬於ServerPath位置。 誰能給我一個建議或鏈接來解決這些問題。
這是錯誤:
使用此示例:
string uriPath = "YourAddress/pricelist.xml";
string localPath = new Uri(uriPath).LocalPath;
您可以嘗試以下解決方案:
基本上,使用
doc.Save(Server.MapPath("~/EEPPriceList/Products.xml"))
嘗試這樣:
string SavePathUrl = ConfigurationManager.AppSettings["SavePathUrl"];
string strFileName = DateTime.Now.ToString("dd-mmm-yyyy-hh-mm-ss-ffffff") + "^" + fileName;
File.WriteAllBytes(new Uri(SavePathUrl).AbsoluteUri + strFileName, Convert.FromBase64String(base64String));
return strFileName;
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.