Windows apps
Collapse the table of content
Expand the table of content
Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

XmlTextReader::ProhibitDtd Property

 
Note: This API is now obsolete.

Gets or sets a value indicating whether to allow DTD processing. This property is obsolete. Use DtdProcessing instead.

Namespace:   System.Xml
Assembly:  System.Xml (in System.Xml.dll)

public:
[ObsoleteAttribute("Use DtdProcessing property instead.")]
property bool ProhibitDtd {
	bool get();
	void set(bool value);
}

Property Value

Type: System::Boolean

true to disallow DTD processing; otherwise false. The default is false.

System_CAPS_noteNote

Starting with the .NET Framework 2.0, we recommend that you create XmlReader instances by using the XmlReader::Create method to take advantage of new functionality.

DTD processing is enabled by default for backwards compatibility. However, unless your application requires DTD processing, you should disable this setting. Disabling DTD processing can be useful in preventing certain denial of service attacks. If set to true, the reader throws an XmlException when any DTD content is encountered.

If you have DTD processing enabled, you need to be aware of including DTDs from untrusted sources and possible denial of service attacks. Use the XmlSecureResolver to restrict the resources that the XmlTextReader 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

.NET Framework
Available since 1.1
Return to top
Show:
© 2017 Microsoft