api调用期间的xml错误gettign [英] xml error gettign during api call

查看:86
本文介绍了api调用期间的xml错误gettign的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,

我收到以下错误,请帮我纠正此错误

Hi All,
I am getting below error , please help me to rectify this error

System.Xml.XmlException: For security reasons DTD is prohibited in this XML document. To enable DTD processing set the DtdProcessing property on XmlReaderSettings to Parse and pass the settings into XmlReader.Create method. at System.Xml.XmlTextReaderImpl.Throw(Exception e) at System.Xml.XmlTextReaderImpl.ThrowWithoutLineInfo(String res) at System.Xml.XmlTextReaderImpl.ParseDoctypeDecl() at System.Xml.XmlTextReaderImpl.ParseDocumentContent() at System.Xml.XmlTextReaderImpl.Read() at System.Xml.XmlReader.MoveToContent() at System.Data.DataSet.ReadXml(XmlReader reader, Boolean denyResolving) at System.Data.DataSet.ReadXml(XmlReader reader) at home.BindMostPopularVideos()System.Xml.XmlException:

推荐答案

deminResolving)at System.Data.DataSet.ReadXml(XmlReader reader)at home.BindMostPopularVideos()System.Xml.XmlException: div>

错误文本实际上是告诉你如何解决这个问题

出于安全原因,此XML文档中禁止使用DTD。要启用DTD处理 将XmlReaderSettings上的DtdProcessing属性设置为Parse 并将设置传递给XmlReader.Create方法
The error text is actually telling you how to get around this
For security reasons DTD is prohibited in this XML document. To enable DTD processing set the DtdProcessing property on XmlReaderSettings to Parse and pass the settings into XmlReader.Create method


这篇关于api调用期间的xml错误gettign的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆