| NLogRequestPostedBodyMiddlewareOptionsMaxContentLength Property |
The maximum request posted body size that will be captured. Defaults to 30KB.
Namespace:
NLog.Web
Assembly:
NLog.Web.AspNetCore (in NLog.Web.AspNetCore.dll) Version: 5.3.13+628b0876960af3ee3454c99b7985dbb5e1c46bf0
Syntax public int MaxContentLength { get; set; }
Public Property MaxContentLength As Integer
Get
Set
Dim instance As NLogRequestPostedBodyMiddlewareOptions
Dim value As Integer
value = instance.MaxContentLength
instance.MaxContentLength = value
member MaxContentLength : int with get, set
Property Value
Type:
Int32Remarks
HttpRequest.EnableBuffer() writes the request to TEMP files on disk if the request ContentLength is > 30KB
but uses memory otherwise if <= 30KB, so we should protect against "very large" request post body payloads.
See Also