我想将我的数据插入到xml文件中。 xml文件位置 路径:http://AutoCompleteInGridView%20new1/Design/Pro/pricelist.xml
。 当插入我的数据时,我得到错误URI formats are not supported
。 它显示参数异常是未处理的。我想将我的xml 文件保存在server system
中。这些url属于ServerPath位置。 任何人都可以给我一个建议或链接来解决这些问题。c#中不支持URI格式
这里是错误:
我想将我的数据插入到xml文件中。 xml文件位置 路径:http://AutoCompleteInGridView%20new1/Design/Pro/pricelist.xml
。 当插入我的数据时,我得到错误URI formats are not supported
。 它显示参数异常是未处理的。我想将我的xml 文件保存在server system
中。这些url属于ServerPath位置。 任何人都可以给我一个建议或链接来解决这些问题。c#中不支持URI格式
这里是错误:
,你可以用这个解决方案尝试:
基本上,使用
doc.Save(Server.MapPath("~/EEPPriceList/Products.xml"))
请不要“仅链接”答案。在这里发布答案的简介。 – Litmus
尝试这样的:
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;
退房这个问题,因为它可能会有所帮助。 http://stackoverflow.com/questions/12560664/exception-uri-formats-are-not-supported – devfunkd
感谢您的答复。在该链接它给出了本地路径的解决方案,但我需要服务器路径。你能给我一个链接吗? – raje
适用相同的概念,请参阅下面的答案。您需要创建字符串变量并将其传递给URI。 – devfunkd