// Token: 0x06001ADA RID: 6874 RVA: 0x000661A0 File Offset: 0x000643A0
        private static void GenerateWopiSrcUrl(HttpRequest request, WacFileRep wacFileRep, string emailAddress, out string wopiSrcUrl, out string wopiSrcUrlForLogging)
        {
            string text  = string.Format("owa/{0}/wopi/files/@/owaatt", HttpUtility.UrlEncode(emailAddress));
            string text2 = string.Format("owa/{0}/wopi/files/@/owaatt", ExtensibleLogger.FormatPIIValue(emailAddress));
            Uri    requestUrlEvenIfProxied = request.GetRequestUrlEvenIfProxied();

            wopiSrcUrl = string.Format("{0}://{1}:{2}/{3}?{4}={5}", new object[]
            {
                requestUrlEvenIfProxied.Scheme,
                requestUrlEvenIfProxied.Host,
                requestUrlEvenIfProxied.Port,
                text,
                "owaatt",
                HttpUtility.UrlEncode(wacFileRep.Serialize())
            });
            wopiSrcUrlForLogging = string.Format("{0}://{1}:{2}/{3}?{4}={5}", new object[]
            {
                requestUrlEvenIfProxied.Scheme,
                requestUrlEvenIfProxied.Host,
                requestUrlEvenIfProxied.Port,
                text2,
                "owaatt",
                HttpUtility.UrlEncode(wacFileRep.Serialize())
            });
            if (Globals.IsPreCheckinApp && request.Cookies["X-DFPOWA-Vdir"] != null)
            {
                wopiSrcUrl = string.Format("{0}&vdir={1}", wopiSrcUrl, request.Cookies["X-DFPOWA-Vdir"].Value);
            }
        }
Ejemplo n.º 2
0
        // Token: 0x06002544 RID: 9540 RVA: 0x00086D20 File Offset: 0x00084F20
        protected override ICollection <KeyValuePair <string, object> > GetComponentSpecificData(IActivityScope activityScope, string eventId)
        {
            Dictionary <string, object> dictionary = new Dictionary <string, object>(20);
            IEnumerable <KeyValuePair <string, object> > formattableMetadata = activityScope.GetFormattableMetadata(OwsLogRegistry.GetRegisteredValues(eventId));

            foreach (KeyValuePair <string, object> keyValuePair in formattableMetadata)
            {
                dictionary.Add(keyValuePair.Key, keyValuePair.Value);
            }
            ExtensibleLogger.CopyPIIProperty(activityScope, dictionary, OwaServerLogger.LoggerData.PrimarySmtpAddress, "PSA");
            ExtensibleLogger.CopyPIIProperty(activityScope, dictionary, OwaServerLogger.LoggerData.User, "user");
            ExtensibleLogger.CopyProperties(activityScope, dictionary, OwaServerLogger.EnumToShortKeyMapping);
            if (Globals.LogErrorDetails)
            {
                ExtensibleLogger.CopyProperty(activityScope, dictionary, ServiceCommonMetadata.GenericErrors, "ErrInfo");
                string property = activityScope.GetProperty(ServiceCommonMetadata.ErrorCode);
                if ((!string.IsNullOrEmpty(activityScope.GetProperty(ServiceCommonMetadata.GenericErrors)) || (!string.IsNullOrEmpty(property) && property != "Success" && property != "0")) && HttpContext.Current != null)
                {
                    string key = OwaServerLogger.EnumToShortKeyMapping[OwaServerLogger.LoggerData.UserAgent];
                    if (!dictionary.ContainsKey(key))
                    {
                        dictionary.Add(key, HttpContext.Current.Request.UserAgent);
                    }
                }
            }
            return(dictionary);
        }
Ejemplo n.º 3
0
 public ICollection <KeyValuePair <string, object> > GetEventData()
 {
     return(new KeyValuePair <string, object>[]
     {
         new KeyValuePair <string, object>("SmtpAddress", ExtensibleLogger.FormatPIIValue(this.smtpAddress)),
         new KeyValuePair <string, object>("ChannelId", this.channelId)
     });
 }
 // Token: 0x060024EE RID: 9454 RVA: 0x00085CD4 File Offset: 0x00083ED4
 public ICollection <KeyValuePair <string, object> > GetEventData()
 {
     return(new KeyValuePair <string, object>[]
     {
         new KeyValuePair <string, object>("PSA", ExtensibleLogger.FormatPIIValue(this.userContext.ExchangePrincipal.MailboxInfo.PrimarySmtpAddress.ToString())),
         new KeyValuePair <string, object>(UserContextCookie.UserContextCookiePrefix, this.userContext.Key.UserContextId.ToString(CultureInfo.InvariantCulture)),
         new KeyValuePair <string, object>("EX", this.exceptionText)
     });
 }
Ejemplo n.º 5
0
        // Token: 0x06002599 RID: 9625 RVA: 0x0008835C File Offset: 0x0008655C
        public ICollection <KeyValuePair <string, object> > GetEventData()
        {
            IActivityScope currentActivityScope    = ActivityContext.GetCurrentActivityScope();
            Dictionary <string, object> dictionary = new Dictionary <string, object>
            {
                {
                    UserContextCookie.UserContextCookiePrefix,
                    this.userContextKey
                },
                {
                    "ActID",
                    (currentActivityScope == null) ? Guid.Empty : currentActivityScope.ActivityId
                },
                {
                    "C",
                    this.userContextStatistics.Created.ToString(CultureInfo.InvariantCulture)
                },
                {
                    "CT",
                    this.userContextStatistics.AcquireLatency
                },
                {
                    "EPT",
                    this.userContextStatistics.ExchangePrincipalCreationTime
                },
                {
                    "MR",
                    this.userContextStatistics.MiniRecipientCreationTime
                },
                {
                    "SKU",
                    this.userContextStatistics.SKUCapabilityTestTime
                },
                {
                    "IL",
                    this.userContextStatistics.CookieCreated ? 1 : 0
                },
                {
                    "Err",
                    (int)this.userContextStatistics.Error
                },
                {
                    "CAN",
                    this.requestUri.AbsolutePath
                }
            };

            if (this.userContext != null && this.userContext.ExchangePrincipal != null)
            {
                dictionary.Add("MG", this.userContext.ExchangePrincipal.MailboxInfo.MailboxGuid);
                dictionary.Add("PSA", ExtensibleLogger.FormatPIIValue(this.userContext.ExchangePrincipal.MailboxInfo.PrimarySmtpAddress.ToString()));
            }
            return(dictionary);
        }
Ejemplo n.º 6
0
        protected override void UpdateOpticsLog(OnlineMeetingResult createMeeting)
        {
            OnlineMeeting onlineMeeting = createMeeting.OnlineMeeting;

            base.CallContext.ProtocolLog.Set(CreateOnlineMeetingMetadata.UserGuid, ExtensibleLogger.FormatPIIValue(this.sipUri));
            base.CallContext.ProtocolLog.Set(CreateOnlineMeetingMetadata.ConferenceId, onlineMeeting.PstnMeetingId);
            base.CallContext.ProtocolLog.Set(CreateOnlineMeetingMetadata.LeaderCount, onlineMeeting.Leaders.Count <string>());
            base.CallContext.ProtocolLog.Set(CreateOnlineMeetingMetadata.AttendeeCount, onlineMeeting.Attendees.Count <string>());
            base.CallContext.ProtocolLog.Set(CreateOnlineMeetingMetadata.ExpiryTime, onlineMeeting.ExpiryTime);
            base.CallContext.ProtocolLog.Set(CreateOnlineMeetingMetadata.AutomaticLeaderAssignment, onlineMeeting.AutomaticLeaderAssignment.ToString());
            base.CallContext.ProtocolLog.Set(CreateOnlineMeetingMetadata.AccessLevel, onlineMeeting.Accesslevel.ToString());
        }
Ejemplo n.º 7
0
 internal ClientLogEvent(Datapoint datapoint, string userContext, string ipAddress, string userName, string clientVersion, string serverVersion, bool isMowa, string clientIdCookieValue = null)
 {
     this.datapoint           = datapoint;
     this.userContext         = userContext;
     this.ipAddress           = ExtensibleLogger.FormatPIIValue(ipAddress);
     this.userName            = ExtensibleLogger.FormatPIIValue(userName);
     this.clientVersion       = clientVersion;
     this.serverVersion       = serverVersion;
     this.isMowa              = isMowa;
     this.clientIdCookieValue = clientIdCookieValue;
     this.BuildDictionary();
 }
Ejemplo n.º 8
0
 public ICollection <KeyValuePair <string, object> > GetEventData()
 {
     return(new KeyValuePair <string, object>[]
     {
         new KeyValuePair <string, object>("MG", this.mailboxGuid),
         new KeyValuePair <string, object>("PSA", ExtensibleLogger.FormatPIIValue(this.primarySmtpAddress)),
         new KeyValuePair <string, object>(UserContextCookie.UserContextCookiePrefix, this.userContextCookie),
         new KeyValuePair <string, object>("CN.A", this.action),
         new KeyValuePair <string, object>("CN.S", ((int)this.canaryStatus).ToString("X")),
         new KeyValuePair <string, object>("CN.T", this.creationTime),
         new KeyValuePair <string, object>("CN.L", this.logData)
     });
 }
Ejemplo n.º 9
0
 public ICollection <KeyValuePair <string, object> > GetEventData()
 {
     return(new KeyValuePair <string, object>[]
     {
         new KeyValuePair <string, object>("ACTID", this.activityContextId),
         new KeyValuePair <string, object>("V", this.version),
         new KeyValuePair <string, object>("LUK", ExtensibleLogger.FormatPIIValue(this.logonUniqueKey)),
         new KeyValuePair <string, object>("CN.N", this.canaryName),
         new KeyValuePair <string, object>("CN.P", this.canaryPath),
         new KeyValuePair <string, object>("CN.S", string.Format("0x{0:X}", (int)this.canaryStatus)),
         new KeyValuePair <string, object>("CN.T", this.creationTime),
         new KeyValuePair <string, object>("CN.L", this.logData)
     });
 }
Ejemplo n.º 10
0
            // Token: 0x06002566 RID: 9574 RVA: 0x000878D4 File Offset: 0x00085AD4
            public virtual ICollection <KeyValuePair <string, object> > GetEventData()
            {
                Dictionary <string, object> dictionary = new Dictionary <string, object>();

                ExtensibleLogger.CopyProperty(this.activityScope, dictionary, OwaServerLogger.LoggerData.UserContext, UserContextCookie.UserContextCookiePrefix);
                ExtensibleLogger.CopyPIIProperty(this.activityScope, dictionary, OwaServerLogger.LoggerData.PrimarySmtpAddress, "PSA");
                dictionary.Add("ActivityID", this.activityScope.ActivityId.ToString());
                dictionary.Add("Component", this.entry.ComponentGuid.ToString());
                dictionary.Add("Type", this.entry.TraceType.ToString());
                dictionary.Add("Tag", this.entry.TraceTag.ToString());
                dictionary.Add("Time", this.entry.Timestamp);
                dictionary.Add("NativeThreadId", this.entry.NativeThreadId);
                dictionary.Add("Trace", this.entry.FormatString);
                return(dictionary);
            }
Ejemplo n.º 11
0
        protected override ICollection <KeyValuePair <string, object> > GetComponentSpecificData(IActivityScope activityScope, string eventId)
        {
            Dictionary <string, object> dictionary = null;

            if (activityScope != null)
            {
                HttpContext httpContext = HttpContext.Current;
                if (httpContext != null)
                {
                    string sourceCafeServer = CafeHelper.GetSourceCafeServer(httpContext.Request);
                    if (!string.IsNullOrEmpty(sourceCafeServer))
                    {
                        activityScope.SetProperty(ActivityContextLoggerMetaData.FrontEndServer, sourceCafeServer);
                    }
                    string requestUrlForLog = httpContext.GetRequestUrlForLog();
                    activityScope.SetProperty(ActivityContextLoggerMetaData.Url, requestUrlForLog);
                }
                RbacPrincipal current = RbacPrincipal.GetCurrent(false);
                if (current != null)
                {
                    string value;
                    if (current.RbacConfiguration.DelegatedPrincipal != null)
                    {
                        value = current.RbacConfiguration.DelegatedPrincipal.UserId;
                    }
                    else
                    {
                        SmtpAddress executingUserPrimarySmtpAddress = current.RbacConfiguration.ExecutingUserPrimarySmtpAddress;
                        value = (executingUserPrimarySmtpAddress.IsValidAddress ? executingUserPrimarySmtpAddress.ToString() : current.RbacConfiguration.ExecutingUserPrincipalName);
                    }
                    if (!string.IsNullOrEmpty(value))
                    {
                        activityScope.SetProperty(ActivityContextLoggerMetaData.PrimarySmtpAddress, value);
                    }
                    OrganizationId organizationId = current.RbacConfiguration.OrganizationId;
                    if (organizationId != null && organizationId.OrganizationalUnit != null)
                    {
                        string name = organizationId.OrganizationalUnit.Name;
                        activityScope.SetProperty(ActivityContextLoggerMetaData.Organization, name);
                    }
                }
                dictionary = new Dictionary <string, object>(ActivityContextLogger.EnumToShortKeyMapping.Count);
                ExtensibleLogger.CopyPIIProperty(activityScope, dictionary, ActivityContextLoggerMetaData.PrimarySmtpAddress, ActivityContextLogger.PrimarySmtpAddressKey);
                ExtensibleLogger.CopyProperties(activityScope, dictionary, ActivityContextLogger.EnumToShortKeyMapping);
            }
            return(dictionary);
        }
Ejemplo n.º 12
0
 // Token: 0x060019C4 RID: 6596 RVA: 0x0005B9DC File Offset: 0x00059BDC
 protected override void UpdateOpticsLog(OnlineMeetingResult createMeeting)
 {
     base.CallContext.ProtocolLog.Set(CreateOnlineMeetingMetadata.UserGuid, ExtensibleLogger.FormatPIIValue(this.sipUri));
     base.CallContext.ProtocolLog.Set(CreateOnlineMeetingMetadata.ConferenceId, createMeeting.OnlineMeeting.PstnMeetingId);
     base.CallContext.ProtocolLog.Set(CreateOnlineMeetingMetadata.LeaderCount, createMeeting.LogEntry.MeetingSettings.Leaders.Count);
     base.CallContext.ProtocolLog.Set(CreateOnlineMeetingMetadata.AttendeeCount, createMeeting.LogEntry.MeetingSettings.Attendees.Count);
     base.CallContext.ProtocolLog.Set(CreateOnlineMeetingMetadata.ExpiryTime, createMeeting.LogEntry.MeetingSettings.ExpiryTime);
     base.CallContext.ProtocolLog.Set(CreateOnlineMeetingMetadata.DefaultEntryExitAnnouncement, createMeeting.LogEntry.DefaultValuesResource.EntryExitAnnouncement.ToString());
     base.CallContext.ProtocolLog.Set(CreateOnlineMeetingMetadata.AutomaticLeaderAssignment, createMeeting.LogEntry.DefaultValuesResource.AutomaticLeaderAssignment.ToString());
     base.CallContext.ProtocolLog.Set(CreateOnlineMeetingMetadata.AccessLevel, createMeeting.LogEntry.DefaultValuesResource.AccessLevel.ToString());
     base.CallContext.ProtocolLog.Set(CreateOnlineMeetingMetadata.ParticipantsWarningThreshold, createMeeting.LogEntry.DefaultValuesResource.ParticipantsWarningThreshold.ToString());
     base.CallContext.ProtocolLog.Set(CreateOnlineMeetingMetadata.PolicyEntryExitAnnouncement, createMeeting.LogEntry.PoliciesResource.EntryExitAnnouncement.ToString());
     base.CallContext.ProtocolLog.Set(CreateOnlineMeetingMetadata.PhoneUserAdmission, createMeeting.LogEntry.PoliciesResource.PhoneUserAdmission.ToString());
     base.CallContext.ProtocolLog.Set(CreateOnlineMeetingMetadata.ExternalUserMeetingRecording, createMeeting.LogEntry.PoliciesResource.ExternalUserMeetingRecording.ToString());
     base.CallContext.ProtocolLog.Set(CreateOnlineMeetingMetadata.MeetingRecording, createMeeting.LogEntry.PoliciesResource.MeetingRecording.ToString());
     base.CallContext.ProtocolLog.Set(CreateOnlineMeetingMetadata.VoipAudio, createMeeting.LogEntry.PoliciesResource.VoipAudio.ToString());
     base.CallContext.ProtocolLog.Set(CreateOnlineMeetingMetadata.MeetingSize, createMeeting.LogEntry.PoliciesResource.MeetingSize);
     base.CallContext.ProtocolLog.Set(CreateOnlineMeetingMetadata.WorkerExceptions, createMeeting.LogEntry.BuildFailureString());
 }
Ejemplo n.º 13
0
        public static UcwaUserConfiguration GetUcwaUserConfiguration(string sipUri, CallContext callContext)
        {
            callContext.ProtocolLog.Set(GetUcwaUserConfigurationMetaData.IsTaskCompleted, bool.FalseString);
            callContext.ProtocolLog.Set(GetUcwaUserConfigurationMetaData.IsUcwaSupported, bool.FalseString);
            UcwaUserConfiguration ucwaUserConfiguration = new UcwaUserConfiguration();

            ucwaUserConfiguration.SipUri = sipUri;
            if (string.IsNullOrEmpty(sipUri))
            {
                callContext.ProtocolLog.Set(GetUcwaUserConfigurationMetaData.IsTaskCompleted, bool.TrueString);
                throw new OwaInvalidRequestException("No sipUri specified");
            }
            UserContext userContext = UserContextManager.GetUserContext(callContext.HttpContext, callContext.EffectiveCaller, true);

            if (string.Compare(userContext.SipUri, sipUri, StringComparison.OrdinalIgnoreCase) != 0)
            {
                callContext.ProtocolLog.Set(GetUcwaUserConfigurationMetaData.ManagerSipUri, ExtensibleLogger.FormatPIIValue(sipUri));
            }
            if (userContext.ExchangePrincipal.MailboxInfo.OrganizationId != null && userContext.ExchangePrincipal.MailboxInfo.OrganizationId.OrganizationalUnit != null)
            {
                callContext.ProtocolLog.Set(GetUcwaUserConfigurationMetaData.Organization, userContext.ExchangePrincipal.MailboxInfo.OrganizationId.OrganizationalUnit.Name);
            }
            OAuthCredentials oauthCredential;

            try
            {
                oauthCredential = UcwaConfigurationUtilities.GetOAuthCredential(sipUri);
                oauthCredential.ClientRequestId = new Guid?(Guid.NewGuid());
                callContext.ProtocolLog.Set(GetUcwaUserConfigurationMetaData.OAuthCorrelationId, oauthCredential.ClientRequestId.Value.ToString());
            }
            catch (OwaException ex)
            {
                string text = UcwaConfigurationUtilities.BuildFailureLogString(ex);
                callContext.ProtocolLog.Set(GetUcwaUserConfigurationMetaData.Exceptions, text);
                ExTraceGlobals.OnlineMeetingTracer.TraceError <string>(0L, "[UcwaConfigurationUtilities.GetUcwaUserConfiguration] An error occurred while obtaining OAuth credential; Exception: {0}", text);
                ucwaUserConfiguration.DiagnosticInfo = text;
                return(ucwaUserConfiguration);
            }
            AutodiscoverResult ucwaDiscoveryUrl = AutodiscoverWorker.GetUcwaDiscoveryUrl(sipUri, oauthCredential);

            callContext.ProtocolLog.Set(GetUcwaUserConfigurationMetaData.AuthenticatedLyncAutodiscoverServer, ucwaDiscoveryUrl.AuthenticatedLyncAutodiscoverServer);
            callContext.ProtocolLog.Set(GetUcwaUserConfigurationMetaData.IsAuthdServerFromCache, ucwaDiscoveryUrl.IsAuthdServerFromCache ? bool.TrueString : bool.FalseString);
            callContext.ProtocolLog.Set(GetUcwaUserConfigurationMetaData.IsUcwaUrlFromCache, ucwaDiscoveryUrl.IsUcwaUrlFromCache ? bool.TrueString : bool.FalseString);
            callContext.ProtocolLog.Set(GetUcwaUserConfigurationMetaData.UnauthenticatedRedirectHops, string.Join(";", ucwaDiscoveryUrl.UnauthenticatedRedirects));
            callContext.ProtocolLog.Set(GetUcwaUserConfigurationMetaData.AuthenticatedRedirectHops, string.Join(";", ucwaDiscoveryUrl.AuthenticatedRedirects));
            callContext.ProtocolLog.Set(GetUcwaUserConfigurationMetaData.WorkerExceptions, ucwaDiscoveryUrl.BuildFailureString());
            if (!ucwaDiscoveryUrl.IsOnlineMeetingEnabled)
            {
                ExTraceGlobals.OnlineMeetingTracer.TraceInformation(0, 0L, "[UcwaConfigurationUtilities.GetUcwaUserConfiguration] Online meetings are not enabled in this topology");
                ucwaUserConfiguration.DiagnosticInfo = "Online meetings not enabled on the server";
                return(ucwaUserConfiguration);
            }
            if (ucwaDiscoveryUrl.HasError)
            {
                Exception     exception     = ucwaDiscoveryUrl.Error.Exception;
                StringBuilder stringBuilder = new StringBuilder(ucwaDiscoveryUrl.Error.FailureStep.ToString() + "_");
                stringBuilder.Append(UcwaConfigurationUtilities.BuildFailureLogString(exception));
                stringBuilder.Append(ucwaDiscoveryUrl.Error.ResponseFailureReason ?? string.Empty);
                string text2 = stringBuilder.ToString();
                callContext.ProtocolLog.Set(GetUcwaUserConfigurationMetaData.Exceptions, text2);
                callContext.ProtocolLog.Set(GetUcwaUserConfigurationMetaData.RequestHeaders, ucwaDiscoveryUrl.Error.RequestHeaders);
                callContext.ProtocolLog.Set(GetUcwaUserConfigurationMetaData.ResponseHeaders, ucwaDiscoveryUrl.Error.ResponseHeaders);
                callContext.ProtocolLog.Set(GetUcwaUserConfigurationMetaData.ResponseBody, ucwaDiscoveryUrl.Error.ResponseBody);
                if (ucwaDiscoveryUrl.IsAuthdServerFromCache)
                {
                    AutodiscoverCache.InvalidateDomain(OnlineMeetingHelper.GetSipDomain(sipUri));
                    callContext.ProtocolLog.Set(GetUcwaUserConfigurationMetaData.CacheOperation, AutodiscoverCacheOperation.InvalidateDomain.ToString());
                }
                ExTraceGlobals.OnlineMeetingTracer.TraceError <string>(0L, "[UcwaConfigurationUtilities.GetUcwaUserConfiguration] An error occured while fetching UCWA configuration; Exception: {0}", text2);
                ucwaUserConfiguration.DiagnosticInfo = text2;
                return(ucwaUserConfiguration);
            }
            callContext.ProtocolLog.Set(GetUcwaUserConfigurationMetaData.ResponseBody, ucwaDiscoveryUrl.ResponseBody);
            ucwaUserConfiguration.IsUcwaSupported = ucwaDiscoveryUrl.IsUcwaSupported;
            ucwaUserConfiguration.UcwaUrl         = ucwaDiscoveryUrl.UcwaDiscoveryUrl;
            callContext.ProtocolLog.Set(GetUcwaUserConfigurationMetaData.IsTaskCompleted, bool.TrueString);
            if (ucwaUserConfiguration.IsUcwaSupported)
            {
                callContext.ProtocolLog.Set(GetUcwaUserConfigurationMetaData.IsUcwaSupported, bool.TrueString);
                callContext.ProtocolLog.Set(GetUcwaUserConfigurationMetaData.UcwaUrl, ucwaUserConfiguration.UcwaUrl);
            }
            return(ucwaUserConfiguration);
        }
 public ILogEvent GetLogEvent(string operationName)
 {
     ArgumentValidator.ThrowIfNullOrWhiteSpace("operationName", operationName);
     base.EnforceInternalState(PerformanceTrackerBase.InternalState.Stopped, "GetLogEvent");
     return(new SchemaBasedLogEvent <GroupEscalateItemLogSchema.OperationEnd>
     {
         {
             GroupEscalateItemLogSchema.OperationEnd.OperationName,
             operationName
         },
         {
             GroupEscalateItemLogSchema.OperationEnd.Elapsed,
             base.ElapsedTime.TotalMilliseconds
         },
         {
             GroupEscalateItemLogSchema.OperationEnd.CPU,
             base.CpuTime.TotalMilliseconds
         },
         {
             GroupEscalateItemLogSchema.OperationEnd.RPCCount,
             base.StoreRpcCount
         },
         {
             GroupEscalateItemLogSchema.OperationEnd.RPCLatency,
             base.StoreRpcLatency.TotalMilliseconds
         },
         {
             GroupEscalateItemLogSchema.OperationEnd.DirectoryCount,
             base.DirectoryCount
         },
         {
             GroupEscalateItemLogSchema.OperationEnd.DirectoryLatency,
             base.DirectoryLatency.TotalMilliseconds
         },
         {
             GroupEscalateItemLogSchema.OperationEnd.StoreTimeInServer,
             base.StoreTimeInServer.TotalMilliseconds
         },
         {
             GroupEscalateItemLogSchema.OperationEnd.StoreTimeInCPU,
             base.StoreTimeInCPU.TotalMilliseconds
         },
         {
             GroupEscalateItemLogSchema.OperationEnd.StorePagesRead,
             base.StorePagesRead
         },
         {
             GroupEscalateItemLogSchema.OperationEnd.StorePagesPreRead,
             base.StorePagesPreread
         },
         {
             GroupEscalateItemLogSchema.OperationEnd.StoreLogRecords,
             base.StoreLogRecords
         },
         {
             GroupEscalateItemLogSchema.OperationEnd.StoreLogBytes,
             base.StoreLogBytes
         },
         {
             GroupEscalateItemLogSchema.OperationEnd.OrigMsgSender,
             ExtensibleLogger.FormatPIIValue(this.OriginalMessageSender)
         },
         {
             GroupEscalateItemLogSchema.OperationEnd.OrigMsgSndRcpType,
             this.OriginalMessageSenderRecipientType
         },
         {
             GroupEscalateItemLogSchema.OperationEnd.OrigMsgClass,
             this.OriginalMessageClass
         },
         {
             GroupEscalateItemLogSchema.OperationEnd.OrigMsgId,
             this.OriginalMessageId
         },
         {
             GroupEscalateItemLogSchema.OperationEnd.OrigMsgInetId,
             this.OriginalInternetMessageId
         },
         {
             GroupEscalateItemLogSchema.OperationEnd.PartOrigMsg,
             this.ParticipantsInOriginalMessage
         },
         {
             GroupEscalateItemLogSchema.OperationEnd.GroupReplyTo,
             this.IsGroupParticipantAddedToReplyTo
         },
         {
             GroupEscalateItemLogSchema.OperationEnd.GroupPart,
             this.IsGroupParticipantAddedToParticipants
         },
         {
             GroupEscalateItemLogSchema.OperationEnd.EnsGroupPart,
             this.EnsureGroupParticipantAddedMilliseconds
         },
         {
             GroupEscalateItemLogSchema.OperationEnd.DedupePart,
             this.DedupeParticipantsMilliseconds
         },
         {
             GroupEscalateItemLogSchema.OperationEnd.PartAddedEsc,
             this.participantsAddedToEscalatedMessage
         },
         {
             GroupEscalateItemLogSchema.OperationEnd.PartSkippedEsc,
             this.participantsSkippedInEscalatedMessage
         },
         {
             GroupEscalateItemLogSchema.OperationEnd.HasEscalated,
             this.HasEscalatedUser
         },
         {
             GroupEscalateItemLogSchema.OperationEnd.GroupReplyToSkipped,
             this.IsGroupParticipantReplyToSkipped
         },
         {
             GroupEscalateItemLogSchema.OperationEnd.SendToYammer,
             this.EscalateToYammer
         },
         {
             GroupEscalateItemLogSchema.OperationEnd.SendToYammerMs,
             this.SendToYammerMilliseconds
         },
         {
             GroupEscalateItemLogSchema.OperationEnd.UnsubscribeUrl,
             this.UnsubscribeUrlInserted
         },
         {
             GroupEscalateItemLogSchema.OperationEnd.UnsubscribeUrlBuildMs,
             this.BuildUnsubscribeUrlMilliseconds
         },
         {
             GroupEscalateItemLogSchema.OperationEnd.UnsubscribeBodySize,
             this.LinkBodySize
         },
         {
             GroupEscalateItemLogSchema.OperationEnd.UnsubscribeUrlDetectionMs,
             this.LinkOnBodyDetectionMilliseconds
         },
         {
             GroupEscalateItemLogSchema.OperationEnd.UnsubscribeUrlInsertMs,
             this.LinkInsertOnBodyMilliseconds
         }
     });
 }
        // Token: 0x06001B77 RID: 7031 RVA: 0x00068CD8 File Offset: 0x00066ED8
        protected override CreateUnifiedGroupResponse InternalExecute()
        {
            CreateUnifiedGroupResponse createUnifiedGroupResponse = new CreateUnifiedGroupResponse();

            if (!this.IsModernGroupUnique())
            {
                throw FaultExceptionUtilities.CreateAvailabilityFault(new UnifiedGroupAlreadyExistsException(), FaultParty.Sender);
            }
            Stopwatch stopwatch = new Stopwatch();

            try
            {
                stopwatch.Start();
                CreateUnifiedGroupTask task = new CreateUnifiedGroupTask(base.CallContext.AccessingADUser, base.CallContext.AccessingPrincipal, base.CallContext.ADRecipientSessionContext.GetADRecipientSession());
                task.Name         = this.request.Name;
                task.Alias        = this.request.Alias;
                task.Description  = this.request.Description;
                task.Type         = ((this.request.GroupType == ModernGroupObjectType.Public) ? ModernGroupTypeInfo.Public : ModernGroupTypeInfo.Private);
                task.AADComplete += delegate()
                {
                    this.PushCreatedPersona(task.ExternalDirectoryObjectId);
                };
                task.AutoSubscribeNewGroupMembers = new bool?(this.request.AutoSubscribeNewGroupMembers);
                task.Language = this.request.Language;
                IFeature autoSubscribeSetByDefault    = VariantConfiguration.GetSnapshot(base.CallContext.AccessingPrincipal.GetContext(null), null, null).OwaClientServer.AutoSubscribeSetByDefault;
                IFeature autoSubscribeNewGroupMembers = VariantConfiguration.GetSnapshot(base.CallContext.AccessingPrincipal.GetContext(null), null, null).OwaClientServer.AutoSubscribeNewGroupMembers;
                if (autoSubscribeNewGroupMembers != null && autoSubscribeNewGroupMembers.Enabled && autoSubscribeSetByDefault != null)
                {
                    base.CallContext.ProtocolLog.Set(CreateModernGroupCommandMetadata.AutoSubscribeOptionDefault, autoSubscribeSetByDefault.Enabled);
                    base.CallContext.ProtocolLog.Set(CreateModernGroupCommandMetadata.AutoSubscribeOptionReceived, this.request.AutoSubscribeNewGroupMembers);
                }
                base.CallContext.ProtocolLog.Set(CreateModernGroupCommandMetadata.DescriptionSpecified, (!string.IsNullOrEmpty(this.request.Description)) ? 1 : 0);
                if (!task.Run())
                {
                    base.CallContext.ProtocolLog.Set(CreateModernGroupCommandMetadata.Exception, task.ErrorException);
                    base.CallContext.ProtocolLog.Set(CreateModernGroupCommandMetadata.ExceptionType, task.ErrorException.GetType());
                    base.CallContext.ProtocolLog.Set(CreateModernGroupCommandMetadata.ErrorAction, task.ErrorAction);
                    if (!string.IsNullOrEmpty(task.ErrorCode))
                    {
                        base.CallContext.ProtocolLog.Set(CreateModernGroupCommandMetadata.ErrorCode, task.ErrorCode);
                    }
                    UnifiedGroupsTask.UnifiedGroupsAction errorAction = task.ErrorAction;
                    if (errorAction == UnifiedGroupsTask.UnifiedGroupsAction.AADCreate)
                    {
                        base.CallContext.ProtocolLog.Set(CreateModernGroupCommandMetadata.ExceptionLocation, "AAD");
                        throw new InternalServerErrorException(task.ErrorException);
                    }
                    if (errorAction != UnifiedGroupsTask.UnifiedGroupsAction.ExchangeCreate)
                    {
                        base.CallContext.ProtocolLog.Set(CreateModernGroupCommandMetadata.ExceptionLocation, "Unknown");
                        throw new InvalidOperationException("Unexpected error action: " + task.ErrorAction, task.ErrorException);
                    }
                    base.CallContext.ProtocolLog.Set(CreateModernGroupCommandMetadata.ExceptionLocation, "Mailbox");
                    base.CallContext.ProtocolLog.Set(ServiceCommonMetadata.GenericErrors, task.ErrorException);
                    createUnifiedGroupResponse.Error        = "Provision failed for group " + this.request.Alias;
                    createUnifiedGroupResponse.FailureState = CreateUnifiedGroupResponse.GroupProvisionFailureState.FailedMailboxProvision;
                }
                else
                {
                    Persona persona = new Persona
                    {
                        ADObjectId   = task.ADObjectGuid,
                        Alias        = this.request.Alias,
                        DisplayName  = this.request.Name,
                        EmailAddress = new EmailAddressWrapper
                        {
                            EmailAddress = task.SmtpAddress,
                            MailboxType  = MailboxHelper.MailboxTypeType.GroupMailbox.ToString()
                        }
                    };
                    createUnifiedGroupResponse.Persona = persona;
                    createUnifiedGroupResponse.ExternalDirectoryObjectId = task.ExternalDirectoryObjectId;
                    base.CallContext.ProtocolLog.Set(CreateModernGroupCommandMetadata.GroupSmtpAddress, ExtensibleLogger.FormatPIIValue(task.SmtpAddress));
                }
                this.LogElapsedTime(CreateModernGroupCommandMetadata.GroupCreationTime, task.CreationDiagnostics.GroupCreationTime);
                this.LogElapsedTime(CreateModernGroupCommandMetadata.AADIdentityCreationTime, task.CreationDiagnostics.AADIdentityCreationTime);
                this.LogElapsedTime(CreateModernGroupCommandMetadata.AADCompleteCallbackTime, task.CreationDiagnostics.AADCompleteCallbackTime);
                this.LogElapsedTime(CreateModernGroupCommandMetadata.SharePointNotificationTime, task.CreationDiagnostics.SharePointNotificationTime);
                this.LogElapsedTime(CreateModernGroupCommandMetadata.MailboxCreationTime, task.CreationDiagnostics.MailboxCreationTime);
            }
            finally
            {
                this.LogElapsedTime(CreateModernGroupCommandMetadata.TotalProcessingTime, new TimeSpan?(stopwatch.Elapsed));
            }
            return(createUnifiedGroupResponse);
        }
        // Token: 0x060019AD RID: 6573 RVA: 0x0005AB7C File Offset: 0x00058D7C
        protected override OnlineMeetingType InternalExecute()
        {
            this.SetDefaultValuesForOptics();
            UserContext userContext = UserContextManager.GetUserContext(base.CallContext.HttpContext, base.CallContext.EffectiveCaller, true);

            if (string.Compare(userContext.SipUri, this.sipUri, StringComparison.OrdinalIgnoreCase) != 0)
            {
                base.CallContext.ProtocolLog.Set(CreateOnlineMeetingMetadata.ManagerSipUri, ExtensibleLogger.FormatPIIValue(this.sipUri));
            }
            if (userContext.ExchangePrincipal.MailboxInfo.OrganizationId != null && userContext.ExchangePrincipal.MailboxInfo.OrganizationId.OrganizationalUnit != null)
            {
                base.CallContext.ProtocolLog.Set(CreateOnlineMeetingMetadata.Organization, userContext.ExchangePrincipal.MailboxInfo.OrganizationId.OrganizationalUnit.Name);
            }
            UcwaUserConfiguration ucwaUserConfiguration = UcwaConfigurationUtilities.GetUcwaUserConfiguration(this.sipUri, base.CallContext);

            if (!ucwaUserConfiguration.IsUcwaSupported)
            {
                base.CallContext.ProtocolLog.Set(CreateOnlineMeetingMetadata.IsUcwaSupported, bool.FalseString);
                string errorString = string.Format("[InternalExecute] Attempted to create an online meeting for a non-UCWA supported user; autodiscover returned UcwaUrl: '{0}', DiagnosticInfo: '{1}'", ucwaUserConfiguration.UcwaUrl, ucwaUserConfiguration.DiagnosticInfo);
                this.LogAndTraceError(errorString);
                return(OnlineMeetingType.CreateFailedOnlineMeetingType("User is not UCWA enabled"));
            }
            if (!this.ShoudlMeetingBeCreated())
            {
                return(OnlineMeetingType.CreateFailedOnlineMeetingType("Item already has an online meeting associated to it."));
            }
            OAuthCredentials oauthCredential;

            try
            {
                oauthCredential = UcwaConfigurationUtilities.GetOAuthCredential(this.sipUri);
                oauthCredential.ClientRequestId = new Guid?(Guid.NewGuid());
                base.CallContext.ProtocolLog.Set(CreateOnlineMeetingMetadata.OAuthCorrelationId, oauthCredential.ClientRequestId.Value.ToString());
            }
            catch (OwaException ex)
            {
                this.LogAndTraceError("An error occurred while obtaining OAuth Credential: " + UcwaConfigurationUtilities.BuildFailureLogString(ex));
                return(OnlineMeetingType.CreateFailedOnlineMeetingType("An error occurred while obtaining OAuth credential"));
            }
            Task <OnlineMeetingResult> task = this.CreateLyncOnlineMeeting(ucwaUserConfiguration.UcwaUrl, oauthCredential, userContext.UserCulture);

            base.CallContext.ProtocolLog.Set(CreateOnlineMeetingMetadata.IsTaskCompleted, task.IsCompleted.ToString());
            if (task.IsFaulted)
            {
                task.Exception.Flatten().Handle(new Func <Exception, bool>(this.HandleCreateOnlineMeetingTaskException));
                return(OnlineMeetingType.CreateFailedOnlineMeetingType("An error occured while calling UCWA to create the meeting"));
            }
            if (task.Result == null)
            {
                this.LogAndTraceError("Result from call to UCWA is null");
                return(OnlineMeetingType.CreateFailedOnlineMeetingType("Unable to create the meeting"));
            }
            if (task.Result.OnlineMeeting.WebUrl == "")
            {
                return(OnlineMeetingType.CreateFailedOnlineMeetingType("Unable to create the meeting"));
            }
            this.UpdateOpticsLog(task.Result);
            OnlineMeetingType result = this.ProcessOnlineMeetingResult(userContext, task.Result);

            this.DiposeObjectsIfNeeded();
            return(result);
        }
Ejemplo n.º 17
0
 public ILogEvent GetLogEvent(string operationName)
 {
     ArgumentValidator.ThrowIfNullOrWhiteSpace("operationName", operationName);
     base.EnforceInternalState(PerformanceTrackerBase.InternalState.Stopped, "GetLogEvent");
     return(new SchemaBasedLogEvent <WorkingSetPublisherLogSchema.OperationEnd>
     {
         {
             WorkingSetPublisherLogSchema.OperationEnd.OperationName,
             operationName
         },
         {
             WorkingSetPublisherLogSchema.OperationEnd.Elapsed,
             base.ElapsedTime.TotalMilliseconds
         },
         {
             WorkingSetPublisherLogSchema.OperationEnd.CPU,
             base.CpuTime.TotalMilliseconds
         },
         {
             WorkingSetPublisherLogSchema.OperationEnd.RPCCount,
             base.StoreRpcCount
         },
         {
             WorkingSetPublisherLogSchema.OperationEnd.RPCLatency,
             base.StoreRpcLatency.TotalMilliseconds
         },
         {
             WorkingSetPublisherLogSchema.OperationEnd.DirectoryCount,
             base.DirectoryCount
         },
         {
             WorkingSetPublisherLogSchema.OperationEnd.DirectoryLatency,
             base.DirectoryLatency.TotalMilliseconds
         },
         {
             WorkingSetPublisherLogSchema.OperationEnd.StoreTimeInServer,
             base.StoreTimeInServer.TotalMilliseconds
         },
         {
             WorkingSetPublisherLogSchema.OperationEnd.StoreTimeInCPU,
             base.StoreTimeInCPU.TotalMilliseconds
         },
         {
             WorkingSetPublisherLogSchema.OperationEnd.StorePagesRead,
             base.StorePagesRead
         },
         {
             WorkingSetPublisherLogSchema.OperationEnd.StorePagesPreRead,
             base.StorePagesPreread
         },
         {
             WorkingSetPublisherLogSchema.OperationEnd.StoreLogRecords,
             base.StoreLogRecords
         },
         {
             WorkingSetPublisherLogSchema.OperationEnd.StoreLogBytes,
             base.StoreLogBytes
         },
         {
             WorkingSetPublisherLogSchema.OperationEnd.OrigMsgSender,
             ExtensibleLogger.FormatPIIValue(this.OriginalMessageSender)
         },
         {
             WorkingSetPublisherLogSchema.OperationEnd.OrigMsgSndRcpType,
             this.OriginalMessageSenderRecipientType
         },
         {
             WorkingSetPublisherLogSchema.OperationEnd.OrigMsgClass,
             this.OriginalMessageClass
         },
         {
             WorkingSetPublisherLogSchema.OperationEnd.OrigMsgId,
             this.OriginalMessageId
         },
         {
             WorkingSetPublisherLogSchema.OperationEnd.OrigMsgInetId,
             this.OriginalInternetMessageId
         },
         {
             WorkingSetPublisherLogSchema.OperationEnd.PartOrigMsg,
             this.ParticipantsInOriginalMessage
         },
         {
             WorkingSetPublisherLogSchema.OperationEnd.GroupPart,
             this.IsGroupParticipantAddedToParticipants
         },
         {
             WorkingSetPublisherLogSchema.OperationEnd.EnsGroupPart,
             this.EnsureGroupParticipantAddedMilliseconds
         },
         {
             WorkingSetPublisherLogSchema.OperationEnd.DedupePart,
             this.DedupeParticipantsMilliseconds
         },
         {
             WorkingSetPublisherLogSchema.OperationEnd.PartAddedPub,
             this.participantsAddedToPublishedMessage
         },
         {
             WorkingSetPublisherLogSchema.OperationEnd.PartSkippedPub,
             this.participantsSkippedInPublishedMessage
         },
         {
             WorkingSetPublisherLogSchema.OperationEnd.PubMsgId,
             this.PublishedMessageId
         },
         {
             WorkingSetPublisherLogSchema.OperationEnd.PubMsgInetId,
             this.PublishedIntnernetMessageId
         },
         {
             WorkingSetPublisherLogSchema.OperationEnd.HasWorkingSet,
             this.HasWorkingSetUser
         },
         {
             WorkingSetPublisherLogSchema.OperationEnd.Exception,
             this.Exception
         }
     });
 }
Ejemplo n.º 18
0
        public void LogSideConversationProcessingData(ParticipantSet parentReplyAllParticipants, ParticipantSet deliveredReplyAllParticipants)
        {
            SchemaBasedLogEvent <ConversationAggregationLogSchema.SideConversationProcessingData> schemaBasedLogEvent = new SchemaBasedLogEvent <ConversationAggregationLogSchema.SideConversationProcessingData>();

            if (deliveredReplyAllParticipants.Count > 10)
            {
                schemaBasedLogEvent.Add(ConversationAggregationLogSchema.SideConversationProcessingData.ParentMessageReplyAllParticipantsCount, parentReplyAllParticipants.Count);
                schemaBasedLogEvent.Add(ConversationAggregationLogSchema.SideConversationProcessingData.DeliveredMessageReplyAllParticipantsCount, deliveredReplyAllParticipants.Count);
            }
            else
            {
                schemaBasedLogEvent.Add(ConversationAggregationLogSchema.SideConversationProcessingData.ParentMessageReplyAllDisplayNames, ExtensibleLogger.FormatPIIValue(this.ConvertParticipantsToLogString(parentReplyAllParticipants)));
                schemaBasedLogEvent.Add(ConversationAggregationLogSchema.SideConversationProcessingData.ParentMessageReplyAllParticipantsCount, parentReplyAllParticipants.Count);
                schemaBasedLogEvent.Add(ConversationAggregationLogSchema.SideConversationProcessingData.DeliveredMessageReplyAllDisplayNames, ExtensibleLogger.FormatPIIValue(this.ConvertParticipantsToLogString(deliveredReplyAllParticipants)));
                schemaBasedLogEvent.Add(ConversationAggregationLogSchema.SideConversationProcessingData.DeliveredMessageReplyAllParticipantsCount, deliveredReplyAllParticipants.Count);
            }
            this.LogEvent(schemaBasedLogEvent);
        }