serilog-web / classic

Serilog web request logging and enrichment for classic ASP.NET applications

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

HttpRequestClientHostIPEnricher: Value does not fall within the expected range

nblumhardt opened this issue · comments

Moved from: serilog/serilog#646

@vidarkongsli wrote:

Found the following stack trace in the self-log from time to time.

2016-01-25T14:18:13 Exception System.ArgumentException: Value does not fall within the expected range.
   at System.Runtime.InteropServices.Marshal.ThrowExceptionForHRInternal(Int32 errorCode, IntPtr errorInfo)
   at System.Web.Hosting.IIS7WorkerRequest.GetServerVariableInternal(String name)
   at SerilogWeb.Classic.Enrichers.HttpRequestClientHostIPEnricher.Enrich(LogEvent logEvent, ILogEventPropertyFactory propertyFactory)
   at Serilog.Core.Pipeline.Logger.Dispatch(LogEvent logEvent) in C:\projects\serilog\src\Serilog\Core\Pipeline\Logger.cs:line 163 caught while enriching Serilog.Events.LogEvent with SerilogWeb.Classic.Enrichers.HttpRequestClientHostIPEnricher.

Serilog 1.5.14
SerilogWeb.Classic 2.0.6

Closing this issue because it is very old.