我在生成PDF文件时使用的是Disposable pattern。().Replace(HttpContext.Current.Request.Url.PathAndQuery, "/"));Capacity: 'printStream.Capacity' threw an exception of type 'System.ObjectDisposedException</
我正在尝试记录用户在执行请求时在应用程序洞察中的用户名。var ip = _httpContextAccessor.HttpContext?.Connection?.RemoteIpAddress?.: 'Safe handle has been closed System.ObjectDisposedException Message=Safe handle但是,当我在dev环境中尝试它时,它只记录服务器名称,而不记录用户名。 所以我认为我
我有很多像下面这样的日志,有人知道这个的根本原因吗?这是否与以下代码相关:if (httpRequestreturn httpRequest.UserHostAddress;// Gets the client IP when hosted in Owin, where there is no HttpContext</