OpenXmlPackage.MaxCharactersInPart Property

Definition

Gets a value that indicates the maximum allowable number of characters in an Open XML part. A zero (0) value indicates that there are no limits on the size of the part. A non-zero value specifies the maximum size, in characters.

public long MaxCharactersInPart { get; }
member this.MaxCharactersInPart : int64
Public ReadOnly Property MaxCharactersInPart As Long

Property Value

Remarks

This property allows you to mitigate denial of service attacks where the attacker submits a package with an extremely large Open XML part. By limiting the size of a part, you can detect the attack and recover reliably.

Applies to