Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

${aspnet-request-form} raises exception in ASP.NET Core #321

Closed
mcliment opened this issue Oct 4, 2018 · 0 comments · Fixed by #322
Closed

${aspnet-request-form} raises exception in ASP.NET Core #321

mcliment opened this issue Oct 4, 2018 · 0 comments · Fixed by #322
Labels
ASP.NET Core ASP.NET Core - all versions bug

Comments

@mcliment
Copy link
Contributor

mcliment commented Oct 4, 2018

Type (choose one):

  • Bug

NLog version: 4.5.10

NLog.Web/NLog.Web.AspNetCore version: 4.7.0

NLog.Extensions.Logging version:

Platform: .NET Core 2

Current NLog config (xml or C#, if relevant)

Not relevant, just add ${aspnet-request-form} to any target in the ASP.NET Core demo.

In case of a BUG:

  • What is the current result?

Raises an Invalid Operation Exception with message Incorrect Content-Type: .

  • What is the expected result?

To ignore requests that don't have posted form data.

Yes.

  • Please post full exception details (message, stacktrace, inner exceptions)

I provide a PR.

  • Are there any workarounds? yes/no

No that I know.

  • Is there a version in which it did work?

4.7.0 is the first to have this renderer.

  • Can you help us by writing an unit test?

Included in the following PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ASP.NET Core ASP.NET Core - all versions bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants