/// <summary> /// Fixed: /// </summary> private void SetProperties() { SysLogType = SysLogModel.SysLogTypes.Info; OnAzure = Environments.RdsProvider == "Azure"; MachineName = Environments.MachineName; ServiceName = Environments.ServiceName; Application = Environments.Application; var request = new Request(System.Web.HttpContext.Current); if (request.HttpRequest != null) { RequestData = request.ProcessedRequestData(); HttpMethod = request.HttpMethod(); ApplicationAge = Applications.ApplicationAge(); ApplicationRequestInterval = Applications.ApplicationRequestInterval(); SessionAge = Sessions.SessionAge(); SessionRequestInterval = Sessions.SessionRequestInterval(); RequestSize = RequestData.Length; Url = request.Url(); UrlReferer = request.UrlReferrer(); UserHostName = request.UserHostName(); UserHostAddress = request.UserHostAddress(); UserLanguage = request.UserLanguage(); UserAgent = request.UserAgent(); SessionGuid = Sessions.SessionGuid(); } InDebug = Debugs.InDebug(); AssemblyVersion = Environments.AssemblyVersion; }
/// <summary> /// Fixed: /// </summary> private void SetProperties(Context context) { SysLogType = SysLogTypes.Info; OnAzure = Environments.RdsProvider == "Azure"; MachineName = Environments.MachineName; ServiceName = Environments.ServiceName; Application = Environments.Application; if (context.Url != null) { RequestData = ProcessedRequestData(context: context); HttpMethod = context.HttpMethod; ApplicationAge = Applications.ApplicationAge(); ApplicationRequestInterval = Applications.ApplicationRequestInterval(); SessionAge = context.SessionAge(); SessionRequestInterval = context.SessionRequestInterval(); RequestSize = RequestData.Length; Url = context.Url; UrlReferer = context.UrlReferrer; UserHostName = context.UserHostName; UserHostAddress = context.UserHostAddress; UserLanguage = context.Language; UserAgent = context.UserAgent; SessionGuid = context.SessionGuid; } InDebug = Debugs.InDebug(); AssemblyVersion = Environments.AssemblyVersion; }