Прочетете на английски Редактиране

Споделяне чрез


XmlResolver.ThrowingResolver Property

Definition

Gets an XML resolver that forbids entity resolution.

C#
public static System.Xml.XmlResolver ThrowingResolver { get; }

Property Value

An XML resolver that forbids entity resolution.

Remarks

Calling GetEntity(Uri, String, Type) or GetEntityAsync(Uri, String, Type) on the XmlResolver instance returned by this property is forbidden and will result in an XmlException being thrown.

Use ThrowingResolver when external entity resolution must be prohibited, even when Document Type Definition (DTD) processing is otherwise enabled.

Applies to

Продукт Версии
.NET 7, 8, 9, 10