【问题标题】:Problem with DTD error - some xml method does not workDTD 错误问题 - 某些 xml 方法不起作用
【发布时间】:2021-11-26 23:25:42
【问题描述】:

我有这样的错误:

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.

这个方法出现这个错误,你能检查一下吗?

entityDescriptor.ReadIdPSsoDescriptorFromUrl(new Uri(Configuration["Saml2:IdPMetadata"]));

【问题讨论】:

    标签: itfoxtec-identity-saml2


    【解决方案1】:

    这是一个安全检查,显然外部元数据 XML 包含 DTD(文档类型定义),这是不允许的。

    【讨论】:

    • 有什么解决办法吗?
    • 您可以下载外部元数据并删除 DTD 元素。对元数据 XML 文档进行签名,然后删除签名。签署元数据文档确实没有理由。您可以手动或以编程方式完成。
    • 你能告诉我我必须把这个文件保存在哪里吗?要删除的 DTD 元素在哪里?在你的包裹里?
    • ITfoxtec Identity Saml2 包不支持它。你需要自己实现下载和 XML 格式化。
    猜你喜欢
    • 1970-01-01
    • 2019-01-23
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2020-07-30
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多