// Token: 0x060002D2 RID: 722 RVA: 0x00011AD4 File Offset: 0x0000FCD4
        internal static void LogProtocolFailure(string operation, IList <string> requestIds, IList <string> cookies, string message, string userName, string protocolSequence, string clientAddress, string organization, Exception exception)
        {
            ProtocolLogSession protocolLogSession = ProtocolLog.CreateSession(0, clientAddress, null, protocolSequence);

            if (!string.IsNullOrEmpty(organization))
            {
                protocolLogSession[ProtocolLog.Field.OrganizationInfo] = organization;
            }
            string text = string.Empty;

            if (cookies != null && cookies.Count > 0)
            {
                text = string.Join("|", cookies);
            }
            string text2 = string.Empty;

            if (requestIds != null && requestIds.Count > 0)
            {
                text2 = string.Join("|", requestIds);
            }
            string arg = string.Empty;

            if (!string.IsNullOrEmpty(text) || !string.IsNullOrEmpty(text2))
            {
                arg = string.Format(" [{0}{1}{2}]", text, string.IsNullOrEmpty(text) ? string.Empty : ";", text2);
            }
            string arg2 = string.Empty;

            if (!string.IsNullOrEmpty(userName))
            {
                arg2 = string.Format(" [{0}]", userName);
            }
            protocolLogSession.AppendProtocolFailure(operation, string.Format("{0}{1}{2}", message, arg2, arg), exception.LogMessage(true));
        }
 // Token: 0x0600000D RID: 13 RVA: 0x00002340 File Offset: 0x00000540
 public void OnStopEnd()
 {
     if (this.isStarted)
     {
         if (Configuration.ProtocolLoggingEnabled)
         {
             ProtocolLog.Shutdown();
         }
         Configuration.Terminate();
         this.eventLog.LogEvent(AddressBookEventLogConstants.Tuple_AddressBookServiceStopSuccess, string.Empty, new object[0]);
     }
     this.isStarted = false;
 }
 private void Append(string operation, string status, int queuedTime, int processingTime)
 {
     if (ProtocolLog.Enabled)
     {
         this[ProtocolLog.Field.Operation]      = operation;
         this[ProtocolLog.Field.RpcStatus]      = status;
         this[ProtocolLog.Field.ProcessingTime] = processingTime;
         this[ProtocolLog.Field.Delay]          = ((queuedTime == 0) ? null : queuedTime);
         ProtocolLog.Append(this.row);
         this[ProtocolLog.Field.SequenceNumber]    = (int)this[ProtocolLog.Field.SequenceNumber] + 1;
         this[ProtocolLog.Field.OperationSpecific] = null;
         this[ProtocolLog.Field.Failures]          = null;
         this[ProtocolLog.Field.Authentication]    = null;
     }
 }
Beispiel #4
0
 internal RfriContext(ClientSecurityContext clientSecurityContext, string userDomain, string clientAddress, string serverAddress, string protocolSequence, string authenticationService, bool encrypted, bool isAnonymous, Guid requestId = default(Guid))
 {
     this.ContextHandle         = NspiContext.GetNextContextHandle();
     this.disposeTracker        = ((IDisposeTrackable)this).GetDisposeTracker();
     this.clientSecurityContext = clientSecurityContext;
     this.userDomain            = userDomain;
     this.encrypted             = encrypted;
     this.isAnonymous           = isAnonymous;
     this.protocolSequence      = protocolSequence;
     this.protocolLogSession    = ProtocolLog.CreateSession(this.ContextHandle, clientAddress, serverAddress, protocolSequence);
     this.ProtocolLogSession[ProtocolLog.Field.Authentication] = authenticationService;
     if (requestId != Guid.Empty)
     {
         ActivityContextState activityContextState = new ActivityContextState(new Guid?(requestId), new ConcurrentDictionary <Enum, object>());
         ActivityContext.ClearThreadScope();
         this.scope = ActivityContext.Resume(activityContextState, null);
     }
 }
Beispiel #5
0
        // Token: 0x06000093 RID: 147 RVA: 0x000041F8 File Offset: 0x000023F8
        protected override void InternalPostExecute(TimeSpan queueAndDelayTime, TimeSpan totalTime, bool calledFromTimeout)
        {
            int num  = (int)totalTime.TotalMilliseconds;
            int num2 = (int)queueAndDelayTime.TotalMilliseconds;

            AddressBookService.NspiRpcRequestsAverageLatency.AddSample((long)num);
            AddressBookPerformanceCountersWrapper.AddressBookPerformanceCounters.NspiRequests.Decrement();
            if (this.status == NspiStatus.Success)
            {
                NspiDispatchTask.NspiTracer.TraceDebug <string, int, int>((long)this.ContextHandle, "{0} succeeded (queued: {1}ms elapsed: {2}ms)\n", this.TaskName, num2, num);
            }
            else
            {
                NspiDispatchTask.NspiTracer.TraceError((long)this.ContextHandle, "{0} failed: 0x{1:X} {1} (queued: {2}ms elapsed: {3}ms)\n", new object[]
                {
                    this.TaskName,
                    this.status,
                    num2,
                    num
                });
            }
            ProtocolLogSession protocolLogSession;

            if (this.context != null)
            {
                protocolLogSession = this.context.ProtocolLogSession;
            }
            else
            {
                protocolLogSession = ProtocolLog.CreateSession(this.ContextHandle, null, null, null);
                protocolLogSession[ProtocolLog.Field.Failures] = "NoContext";
            }
            if (calledFromTimeout)
            {
                protocolLogSession[ProtocolLog.Field.Failures] = "Throttled";
            }
            protocolLogSession.Append(this.TaskName, this.status, num2, num);
        }