Skip to content

NLogRequestPostedBodyMiddleware - Fixed handling of Stream.Position#962

Merged
snakefoot merged 1 commit into
NLog:masterfrom
snakefoot:master
Jul 4, 2023
Merged

NLogRequestPostedBodyMiddleware - Fixed handling of Stream.Position#962
snakefoot merged 1 commit into
NLog:masterfrom
snakefoot:master

Conversation

@snakefoot

@snakefoot snakefoot commented Jul 4, 2023

Copy link
Copy Markdown
Contributor

Fixed bug introduced with #958 + #933

System.NotSupportedException: Specified method is not supported.
   at Microsoft.AspNetCore.Server.IIS.Core.ReadOnlyStream.get_Position()
   at Microsoft.AspNetCore.Server.IIS.Core.WrappingStream.get_Position()
   at NLog.Web.NLogRequestPostedBodyMiddleware.ShouldCaptureRequestBody(HttpContext context)
   at NLog.Web.NLogRequestPostedBodyMiddleware.Invoke(HttpContext context)
   at Microsoft.AspNetCore.Authorization.AuthorizationMiddleware.Invoke(HttpContext ontext)
   at Swashbuckle.AspNetCore.SwaggerUI.SwaggerUIMiddleware.Invoke(HttpContext httpContext)
   at Swashbuckle.AspNetCore.Swagger.SwaggerMiddleware.Invoke(HttpContext httpContext, waggerProvider swaggerProvider)
   at Microsoft.AspNetCore.HttpLogging.HttpLoggingMiddleware.InvokeInternal(HttpContext context)
   at Microsoft.AspNetCore.Diagnostics.DeveloperExceptionPageMiddleware.Invoke(HttpContext context)

See also: https://stackoverflow.com/q/76610846/193178

@sonarqubecloud

sonarqubecloud Bot commented Jul 4, 2023

Copy link
Copy Markdown

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant