[英]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.