Invalid URI: The Uri string is too long(无效的 URI:Uri 字符串太长)
问题描述
我正在尝试获取架构并针对我的 xml 进行验证.
我明白了
不告诉我最大长度是多少或任何东西.以前有人收到过这个吗?
如果参数是字符串,问题是你的 xmlreader.create 函数中的 xml 应该是 uri.
例如.
在您的情况下,xml 文件被解释为 url,因此它抱怨限制.
看看这个 msdn 文档 XmlReader.Create 方法对于不同的重载方法..
我猜你应该使用 TextReader 之一.p>
I am trying to grab a schema and validate against my xml.
I get
Does not tell me what the max length is or anything. Anyone ever get this before?
the problem is that the xml in your xmlreader.create function should be a uri if the argument is a string.
eg.
In your case the xml file is being interpreted as the url and hence it is complaining about the limit.
look at this msdn doc XmlReader.Create Method for different overloaded methods..
I am guessing you should use the TextReader one.
这篇关于无效的 URI:Uri 字符串太长的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!