Skip to content

System.Collections.Generic.KeyNotFoundException: 'The given key 'Serilog_ClientIp' was not present in the dictionary.' #49

@Mike-E-angelo

Description

@Mike-E-angelo

I have noticed that client ip and correlation id have not been emitting in my logs for some time now and I finally got a chance to look into it. It appears that a call is made to httpContext.Items with a key that does not exist, leading to an error:

Image

This error does not appear to elevate to the user and gets emitted to the SelfLog.

Please note that this is running in a Blazor server-side circuit and worked in previous versions (from what I can tell did not make a call into Items).

I would greatly appreciate any pointers on how to solve this issue. Thank you for all the work you have done over there. 🙏

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions