Click or drag to resize

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; }

Property Value

Type: Int32
Remarks
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