示例#1
0
        internal static string GetDiagnosticsInfo(HttpContext context)
        {
            RequestDetailsLogger current = RequestDetailsLoggerBase <RequestDetailsLogger> .GetCurrent(context);

            Guid           guid          = Guid.Empty;
            IActivityScope activityScope = null;

            if (current != null)
            {
                guid          = current.ActivityId;
                activityScope = current.ActivityScope;
            }
            string text = string.Format("[ClientAccessServer={0},BackEndServer={1},RequestId={2},TimeStamp={3}] ", new object[]
            {
                Environment.MachineName,
                (activityScope == null) ? "UnKown" : activityScope.GetProperty(HttpProxyMetadata.TargetServer),
                guid,
                DateTime.UtcNow
            });
            string text2 = string.Empty;

            if (context != null)
            {
                text2 = WinRMInfo.GetFailureCategoryInfo(context);
            }
            if (!string.IsNullOrEmpty(text2))
            {
                text += string.Format("[FailureCategory={0}] ", text2);
            }
            ExTraceGlobals.VerboseTracer.TraceDebug <string>(0L, "[WinRMHelper::GetDiagnosticsInfo] diagnosticsInfo = {0}.", text);
            return(text);
        }
示例#2
0
        // Token: 0x0600046E RID: 1134 RVA: 0x00018BF0 File Offset: 0x00016DF0
        internal static string GetDiagnosticsInfo(HttpContext context)
        {
            RequestDetailsLogger current = RequestDetailsLoggerBase <RequestDetailsLogger> .GetCurrent(context);

            Guid           guid          = Guid.Empty;
            IActivityScope activityScope = null;

            if (current != null)
            {
                guid          = current.ActivityId;
                activityScope = current.ActivityScope;
            }
            string text = string.Format("[ClientAccessServer={0},BackEndServer={1},RequestId={2},TimeStamp={3}] ", new object[]
            {
                Environment.MachineName,
                (activityScope == null) ? "UnKnown" : activityScope.GetProperty(13),
                guid,
                DateTime.UtcNow
            });
            string text2 = string.Empty;

            if (context != null)
            {
                text2 = WinRMInfo.GetFailureCategoryInfo(context);
            }
            if (!string.IsNullOrEmpty(text2))
            {
                text += string.Format("[FailureCategory={0}] ", text2);
            }
            string text3 = context.Response.Headers["X-BasicAuthToOAuthConversionDiagnostics"];

            if (!string.IsNullOrWhiteSpace(text3))
            {
                text += string.Format("BasicAuthToOAuthConversionDiagnostics={0}", text3);
            }
            if (ExTraceGlobals.VerboseTracer.IsTraceEnabled(1))
            {
                ExTraceGlobals.VerboseTracer.TraceDebug <string>(0L, "[WinRMHelper::GetDiagnosticsInfo] diagnosticsInfo = {0}.", text);
            }
            return(text);
        }