GoDaddy 服务器上未定义 System.Xml.XmlDictionaryReaderQuotas
我创建了一些代码来将 JSON HttpWebResponse 分解为 XmlDictionaryReader:
Dim response As HttpWebResponse = request.GetResponse()
Dim xmlQuotas As New Global.System.Xml.XmlDictionaryReaderQuotas
Dim yelpJson As System.Xml.XmlDictionaryReader = System.Runtime.Serialization.Json.JsonReaderWriterFactory.CreateJsonReader(response.GetResponseStream(), xmlQuotas)
一切在我的本地计算机以及另一台远程服务器上运行良好,但是,当我将其移至我的 GoDaddy 托管帐户时,我得到以下信息错误:
Compiler Error Message: BC30002: Type 'System.Xml.XmlDictionaryReaderQuotas' is not defined.
这似乎是标准类型,所以我不知道为什么它不会被定义,并且它似乎在我的本地计算机和另一个远程服务器上都没有问题。
有谁知道吗: a) 什么会导致这个或 b) 如何解决它以在我的 GoDaddy 服务器上运行?
除了重新创建整个 XmlDictionaryReaderQuotas 类型之外,我已经尝试了所有方法。
I've got some code I created to break down a JSON HttpWebResponse into a XmlDictionaryReader:
Dim response As HttpWebResponse = request.GetResponse()
Dim xmlQuotas As New Global.System.Xml.XmlDictionaryReaderQuotas
Dim yelpJson As System.Xml.XmlDictionaryReader = System.Runtime.Serialization.Json.JsonReaderWriterFactory.CreateJsonReader(response.GetResponseStream(), xmlQuotas)
Everything works great on my local machine, as well as on another remote server, however, when I move this to my GoDaddy hosting account, I get the following error:
Compiler Error Message: BC30002: Type 'System.Xml.XmlDictionaryReaderQuotas' is not defined.
This seems to be a standard type, so I don't know why it wouldn't be defined and it seemed to work without issue on both my local machine as well as another remote server.
Does anybody know either:
a) what would cause this or
b) how I can resolve it to work on my GoDaddy server?
I've tried everything short of recreating the entire XmlDictionaryReaderQuotas type.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
永远无法弄清楚这一点,所以我继续摆脱 XmlDictionaryReader 和 XmlDictionaryReaderQuotas。相反,我使用 JavaScriptSerializer 将所有内容反序列化为 Dictionary(Of String, Object) 类型,然后使用一些自定义函数对其进行爬行以返回我需要的任何值。
Never could figure this out, so I went ahead and got rid of the XmlDictionaryReader and XmlDictionaryReaderQuotas. Instead I used a JavaScriptSerializer to deserialize everything into a Dictionary(Of String, Object) type, then crawled through it using some custom functions to return whatever value I need.