System.Xml.XmlReaderSettings.ProhibitDtd Property

Gets or sets a value indicating whether to prohibit document type definition (DTD) processing. This property is obsolete. Use XmlTextReader.DtdProcessing instead.

Syntax

[System.Obsolete("Use DtdProcessing property instead")]
public bool ProhibitDtd { get; set; }

Value

Documentation for this section has not yet been entered.

Remarks

When set to true, the System.Xml.XmlReader throws an System.Xml.XmlException when any DTD content is encountered. Do not enable DTD processing if you are concerned about Denial of Service issues or if you are dealing with untrusted sources.

If you have DTD processing enabled, you can use the System.Xml.XmlSecureResolver to restrict the resources that the System.Xml.XmlReader can access. You can also design your application so that the XML processing is memory and time constrained. For example, configure time-out limits in your ASP.NET application.

This property is obsolete. Use XmlTextReader.DtdProcessing instead. If you had set XmlReaderSettings.ProhibitDtd to its default value true set XmlTextReader.DtdProcessing to Prohibit. If you had set XmlReaderSettings.ProhibitDtd to false set XmlTextReader.DtdProcessing to Parse.

Requirements

Namespace: System.Xml
Assembly: System.Xml (in System.Xml.dll)
Assembly Versions: 2.0.0.0, 4.0.0.0
Since: .NET 2.0