// Token: 0x06003144 RID: 12612 RVA: 0x00122F5C File Offset: 0x0012115C
        private static void TransferToContact(KeyMappingBase keyMappingBase, UserContext userContext, StringBuilder builder, KeyMappingTypeEnum keyMappingType, bool addNewLine)
        {
            string text = UnifiedMessagingUtilities.AddContext(keyMappingBase);
            string contactNameFromLegacyDN = UnifiedMessagingUtilities.GetContactNameFromLegacyDN(((TransferToADContact)keyMappingBase).LegacyExchangeDN, userContext);

            Strings.IDs?ds = null;
            if (keyMappingType == KeyMappingTypeEnum.TransferToADContactMailbox)
            {
                ds = new Strings.IDs?(1644624696);
            }
            else
            {
                ds = new Strings.IDs?(-348119052);
            }
            if (addNewLine)
            {
                builder.Append("\r\n");
            }
            builder.Append(Utilities.HtmlEncode(string.Format(CultureInfo.CurrentCulture, LocalizedStrings.GetNonEncoded(ds.Value), new object[]
            {
                text,
                keyMappingBase.Key,
                contactNameFromLegacyDN
            })));
        }
Пример #2
0
 // Token: 0x060025AA RID: 9642 RVA: 0x000DA2F8 File Offset: 0x000D84F8
 private void AddResponseMessageInfobarToResponseMessage(Infobar infobar)
 {
     Strings.IDs?ds = null;
     if (this.sharingMessage.SharingMessageType == SharingMessageType.AcceptOfRequest)
     {
         ds = new Strings.IDs?(456591501);
     }
     else if (this.sharingMessage.SharingMessageType == SharingMessageType.DenyOfRequest)
     {
         ds = new Strings.IDs?(-417268086);
     }
     if (ds != null)
     {
         string text = this.sharingMessage.Sender.DisplayName;
         if (string.IsNullOrEmpty(text))
         {
             text = (this.sharingMessage.Sender.TryGetProperty(ParticipantSchema.SmtpAddress) as string);
         }
         SanitizedHtmlString messageHtml = SanitizedHtmlString.Format(LocalizedStrings.GetHtmlEncoded(ds.Value), new object[]
         {
             text
         });
         infobar.AddMessage(messageHtml, InfobarMessageType.Informational);
     }
 }
Пример #3
0
        // Token: 0x060025AB RID: 9643 RVA: 0x000DA3B0 File Offset: 0x000D85B0
        private void AddResponseMessageInfobarToRequestMessage(Infobar infobar)
        {
            Strings.IDs?ds = null;
            switch (this.sharingMessage.SharingResponseType)
            {
            case SharingResponseType.Allowed:
                ds = new Strings.IDs?(-310218305);
                break;

            case SharingResponseType.Denied:
                ds = new Strings.IDs?(1130758124);
                break;
            }
            if (ds != null)
            {
                ExDateTime?sharingResponseTime = this.sharingMessage.SharingResponseTime;
                string     text  = string.Empty;
                string     text2 = string.Empty;
                if (sharingResponseTime != null)
                {
                    text  = sharingResponseTime.Value.ToString(this.userContext.UserOptions.DateFormat);
                    text2 = sharingResponseTime.Value.ToString(this.userContext.UserOptions.TimeFormat);
                }
                SanitizedHtmlString messageHtml = SanitizedHtmlString.Format(LocalizedStrings.GetHtmlEncoded(ds.Value), new object[]
                {
                    text,
                    text2
                });
                infobar.AddMessage(messageHtml, InfobarMessageType.Informational);
            }
        }
        // Token: 0x06000987 RID: 2439 RVA: 0x000220EC File Offset: 0x000202EC
        private static bool RemedyExceptionHandlingError(Exception exception, RequestContext requestContext, out string error, out Strings.IDs?errorMessageId, out bool siteMailbox)
        {
            DateTime?dateTime = null;

            error          = string.Empty;
            errorMessageId = null;
            siteMailbox    = ErrorHandlerUtilities.IsSharePointAppRequest(requestContext, out dateTime);
            if (siteMailbox)
            {
                if ((exception is ConnectionFailedTransientException && exception.InnerException is MapiExceptionLogonFailed) || (exception is AccessDeniedException || (exception is OwaExplicitLogonException && exception.InnerException is AccessDeniedException)) || (exception is InvalidSerializedAccessTokenException && exception.InnerException is ObjectNotFoundException))
                {
                    error          = Strings.GetLocalizedString(-1076784851);
                    errorMessageId = new Strings.IDs?(-1076784851);
                    return(true);
                }
                bool flag = dateTime == null || dateTime.Value.AddMinutes(30.0).ToUniversalTime() > DateTime.UtcNow;
                if (flag)
                {
                    error          = Strings.GetLocalizedString(825706319);
                    errorMessageId = new Strings.IDs?(825706319);
                    return(true);
                }
            }
            return(false);
        }
Пример #5
0
 private void RenderTitleMenuItem(TextWriter writer, Strings.IDs title, Strings.IDs?caption)
 {
     writer.Write("<div class=\"vwMnTtl\">");
     writer.Write(SanitizedHtmlString.FromStringId(title));
     writer.Write("</div>");
     if (caption != null)
     {
         writer.Write("<div class=\"vwMnCap\">");
         writer.Write(SanitizedHtmlString.FromStringId(caption.Value));
         writer.Write("</div>");
     }
 }
Пример #6
0
 private void RenderCrumb(string displayName, Strings.IDs?untitledName, string uri, UriFlags libraryType, bool refreshViewer)
 {
     if (untitledName != null && string.IsNullOrEmpty(displayName))
     {
         displayName = LocalizedStrings.GetNonEncoded(untitledName.Value);
     }
     base.Writer.Write("<span dir=\"ltr\" ");
     Utilities.RenderScriptHandler(base.Writer, "oncontextmenu", "shwBrCrMnu(_this);");
     base.Writer.Write(" ");
     Utilities.RenderScriptHandler(base.Writer, "onclick", "opnDocFldr(_this.uri," + (refreshViewer ? "1" : "0") + ");");
     base.Writer.Write(" uri=\"");
     Utilities.HtmlEncode(uri, base.Writer);
     base.Writer.Write("\" uf=");
     base.Writer.Write((int)libraryType);
     base.Writer.Write("\">");
     Utilities.HtmlEncode(displayName, base.Writer);
     base.Writer.Write("</span>");
 }
Пример #7
0
        // Token: 0x06002FD0 RID: 12240 RVA: 0x00116600 File Offset: 0x00114800
        public static void AddCalendarInfobarMessages(Infobar infobar, CalendarItemBase calendarItemBase, MeetingMessage meetingMessage, UserContext userContext)
        {
            if (infobar == null)
            {
                throw new ArgumentNullException("infobar");
            }
            if (calendarItemBase == null)
            {
                throw new ArgumentNullException("calendarItemBase");
            }
            if (userContext == null)
            {
                throw new ArgumentNullException("userContext");
            }
            bool       flag      = calendarItemBase.IsOrganizer() && calendarItemBase.IsMeeting;
            ExDateTime localTime = DateTimeUtilities.GetLocalTime();
            bool       flag2     = false;

            if (calendarItemBase.IsMeeting && calendarItemBase.IsCancelled)
            {
                infobar.AddMessage(-161808760, InfobarMessageType.Informational);
            }
            if (calendarItemBase.CalendarItemType == CalendarItemType.RecurringMaster)
            {
                CalendarItem calendarItem = (CalendarItem)calendarItemBase;
                if (calendarItem.Recurrence != null && !(calendarItem.Recurrence.Range is NoEndRecurrenceRange))
                {
                    OccurrenceInfo lastOccurrence = calendarItem.Recurrence.GetLastOccurrence();
                    if (lastOccurrence != null && lastOccurrence.EndTime < localTime)
                    {
                        infobar.AddMessage(-2124392108, InfobarMessageType.Informational);
                        flag2 = true;
                    }
                }
            }
            else if (calendarItemBase.EndTime < localTime)
            {
                flag2 = true;
                if (calendarItemBase.CalendarItemType != CalendarItemType.RecurringMaster)
                {
                    infobar.AddMessage(-593429293, InfobarMessageType.Informational);
                }
            }
            InfobarMessageBuilder.AddFlag(infobar, calendarItemBase, userContext);
            if (flag)
            {
                if (calendarItemBase.MeetingRequestWasSent)
                {
                    CalendarUtilities.AddAttendeeResponseCountMessage(infobar, calendarItemBase);
                }
                else
                {
                    infobar.AddMessage(613373695, InfobarMessageType.Informational);
                }
            }
            if (!calendarItemBase.IsOrganizer() && calendarItemBase.IsMeeting)
            {
                bool           flag3          = false;
                MeetingRequest meetingRequest = meetingMessage as MeetingRequest;
                if (meetingRequest != null)
                {
                    flag3 = (meetingRequest.MeetingRequestType == MeetingMessageType.PrincipalWantsCopy);
                }
                if (calendarItemBase.ResponseType != ResponseType.NotResponded)
                {
                    Strings.IDs?ds  = null;
                    Strings.IDs?ds2 = null;
                    switch (calendarItemBase.ResponseType)
                    {
                    case ResponseType.Tentative:
                        ds  = new Strings.IDs?(-1859761232);
                        ds2 = new Strings.IDs?(1365345389);
                        break;

                    case ResponseType.Accept:
                        ds  = new Strings.IDs?(-700793833);
                        ds2 = new Strings.IDs?(-1153967082);
                        break;

                    case ResponseType.Decline:
                        ds  = new Strings.IDs?(-278420592);
                        ds2 = new Strings.IDs?(2009978813);
                        break;
                    }
                    if (ds != null)
                    {
                        ExDateTime property = ItemUtility.GetProperty <ExDateTime>(calendarItemBase, CalendarItemBaseSchema.AppointmentReplyTime, ExDateTime.MinValue);
                        string     text     = Strings.None;
                        string     text2    = string.Empty;
                        if (property != ExDateTime.MinValue)
                        {
                            text  = property.ToString(userContext.UserOptions.DateFormat);
                            text2 = property.ToString(userContext.UserOptions.TimeFormat);
                        }
                        string property2 = ItemUtility.GetProperty <string>(calendarItemBase, CalendarItemBaseSchema.AppointmentReplyName, string.Empty);
                        SanitizedHtmlString messageHtml;
                        if (string.Compare(property2, userContext.ExchangePrincipal.MailboxInfo.DisplayName, StringComparison.OrdinalIgnoreCase) == 0)
                        {
                            messageHtml = SanitizedHtmlString.Format(LocalizedStrings.GetHtmlEncoded(ds.Value), new object[]
                            {
                                text,
                                text2
                            });
                        }
                        else
                        {
                            messageHtml = SanitizedHtmlString.Format(LocalizedStrings.GetHtmlEncoded(ds2.Value), new object[]
                            {
                                property2,
                                text,
                                text2
                            });
                        }
                        infobar.AddMessage(messageHtml, InfobarMessageType.Informational);
                        return;
                    }
                }
                else if (!flag2 && !calendarItemBase.IsCancelled)
                {
                    if (!flag3)
                    {
                        bool property3 = ItemUtility.GetProperty <bool>(calendarItemBase, ItemSchema.IsResponseRequested, true);
                        if (property3)
                        {
                            infobar.AddMessage(919273049, InfobarMessageType.Informational);
                        }
                        else
                        {
                            infobar.AddMessage(1602295502, InfobarMessageType.Informational);
                        }
                    }
                    else
                    {
                        infobar.AddMessage(-200304859, InfobarMessageType.Informational);
                    }
                    CalendarUtilities.GetConflictingAppointments(infobar, calendarItemBase, userContext);
                }
            }
        }
        // Token: 0x06003136 RID: 12598 RVA: 0x001223E8 File Offset: 0x001205E8
        internal static string GetErrorResourceId(PAAValidationResult result, string data)
        {
            Strings.IDs?ds   = null;
            bool        flag = false;

            switch (result)
            {
            case PAAValidationResult.ParseError:
                ds   = new Strings.IDs?(-1771439532);
                flag = true;
                goto IL_D8;

            case PAAValidationResult.SipUriInNonSipDialPlan:
                ds   = new Strings.IDs?(-1315215359);
                flag = true;
                goto IL_D8;

            case PAAValidationResult.PermissionCheckFailure:
                ds = new Strings.IDs?(922375801);
                goto IL_D8;

            case PAAValidationResult.NonExistentContact:
                ds = new Strings.IDs?(2004848387);
                goto IL_D8;

            case PAAValidationResult.NoValidPhones:
                ds   = new Strings.IDs?(839747470);
                flag = true;
                goto IL_D8;

            case PAAValidationResult.NonExistentDefaultContactsFolder:
                ds = new Strings.IDs?(2028770649);
                goto IL_D8;

            case PAAValidationResult.NonExistentDirectoryUser:
                ds = new Strings.IDs?(1890666003);
                goto IL_D8;

            case PAAValidationResult.NonMailboxDirectoryUser:
                ds   = new Strings.IDs?(1357571235);
                flag = true;
                goto IL_D8;

            case PAAValidationResult.InvalidExtension:
                ds   = new Strings.IDs?(-983837116);
                flag = true;
                goto IL_D8;
            }
            ds = new Strings.IDs?(-1018465893);
            IL_D8:
            string result2;

            if (flag)
            {
                result2 = Utilities.HtmlEncode(string.Format(CultureInfo.CurrentCulture, LocalizedStrings.GetNonEncoded(ds.Value), new object[]
                {
                    data
                }));
            }
            else
            {
                result2 = LocalizedStrings.GetHtmlEncoded(ds.Value);
            }
            return(result2);
        }
 // Token: 0x06000E61 RID: 3681 RVA: 0x0005BB50 File Offset: 0x00059D50
 protected void RenderPartialFailure(Strings.IDs messageString, Strings.IDs?titleString, ButtonDialogIcon icon, OwaEventHandlerErrorCode errorCode)
 {
     this.RenderPartialFailure(LocalizedStrings.GetHtmlEncoded(messageString), (titleString != null) ? LocalizedStrings.GetHtmlEncoded(titleString.Value) : null, icon, errorCode);
 }
 // Token: 0x06000E60 RID: 3680 RVA: 0x0005BB43 File Offset: 0x00059D43
 protected void RenderPartialFailure(Strings.IDs messageString, Strings.IDs?titleString, ButtonDialogIcon icon)
 {
     this.RenderPartialFailure(messageString, titleString, icon, OwaEventHandlerErrorCode.NotSet);
 }
        // Token: 0x06000983 RID: 2435 RVA: 0x00021474 File Offset: 0x0001F674
        private static ErrorInformation GetExceptionHandlingInformation(Exception exception, RequestContext requestContext)
        {
            bool sendWatsonReport = false;

            Strings.IDs?    messageId        = null;
            string          messageParameter = null;
            string          lids             = null;
            SupportLevel?   supportLevel     = null;
            IMailboxContext mailboxContext   = (requestContext != null) ? requestContext.UserContext : null;
            string          text             = string.Empty;

            if (mailboxContext != null)
            {
                text = mailboxContext.PrimarySmtpAddress.ToString();
            }
            string message;

            if (exception is OwaNotSupportedException)
            {
                message = exception.Message;
            }
            else if (exception is OwaIdentityException)
            {
                sendWatsonReport = false;
                message          = exception.Message;
            }
            else if (exception is OwaExistentNotificationPipeException)
            {
                message   = Strings.GetLocalizedString(1295605912);
                messageId = new Strings.IDs?(1295605912);
            }
            else if (exception is OwaNotificationPipeException)
            {
                message          = Strings.GetLocalizedString(-771052428);
                messageId        = new Strings.IDs?(-771052428);
                sendWatsonReport = false;
            }
            else if (exception is OwaOperationNotSupportedException)
            {
                message = exception.Message;
            }
            else if (exception is OwaADObjectNotFoundException)
            {
                OwaADUserNotFoundException ex = exception as OwaADUserNotFoundException;
                supportLevel = new SupportLevel?(SupportLevel.TenantAdmin);
                if (ex != null && !string.IsNullOrWhiteSpace(ex.UserName))
                {
                    message          = string.Format(Strings.GetLocalizedString(-765910865), ex.UserName);
                    messageId        = new Strings.IDs?(-765910865);
                    messageParameter = ex.UserName;
                }
                else
                {
                    message   = Strings.GetLocalizedString(-950823100);
                    messageId = new Strings.IDs?(-950823100);
                }
            }
            else if (exception is OwaLockTimeoutException || exception is BailOutException)
            {
                message   = Strings.GetLocalizedString(-116001901);
                messageId = new Strings.IDs?(-116001901);
                if (requestContext != null)
                {
                    requestContext.HttpContext.Response.AppendToLog("&s=ReqTimeout");
                }
            }
            else if (exception is ObjectExistedException)
            {
                message   = Strings.GetLocalizedString(-1399945920);
                messageId = new Strings.IDs?(-1399945920);
            }
            else if (exception is MailboxInSiteFailoverException)
            {
                sendWatsonReport = false;
                message          = Strings.GetLocalizedString(26604436);
                messageId        = new Strings.IDs?(26604436);
                supportLevel     = new SupportLevel?(SupportLevel.Transient);
            }
            else if (exception is MailboxCrossSiteFailoverException || exception is WrongServerException)
            {
                sendWatsonReport = false;
                message          = Strings.GetLocalizedString(26604436);
                messageId        = new Strings.IDs?(26604436);
                supportLevel     = new SupportLevel?(SupportLevel.Transient);
            }
            else if (exception is MailboxInTransitException)
            {
                sendWatsonReport = false;
                message          = Strings.GetLocalizedString(-1739093686);
                messageId        = new Strings.IDs?(-1739093686);
                supportLevel     = new SupportLevel?(SupportLevel.Transient);
            }
            else if (exception is ResourceUnhealthyException)
            {
                sendWatsonReport = false;
                message          = Strings.GetLocalizedString(198161982);
                messageId        = new Strings.IDs?(198161982);
                OwaDiagnostics.LogEvent(ClientsEventLogConstants.Tuple_ErrorResourceUnhealthy, string.Empty, new object[]
                {
                    text,
                    exception.ToString()
                });
            }
            else if (exception is ConnectionFailedPermanentException || exception is ServerNotFoundException)
            {
                message          = string.Format(Strings.GetLocalizedString(-765910865), text);
                messageId        = new Strings.IDs?(-765910865);
                messageParameter = text;
                supportLevel     = new SupportLevel?(SupportLevel.EscalateToSupport);
            }
            else if (exception is ConnectionFailedTransientException || exception is MailboxOfflineException)
            {
                if (exception.InnerException is MapiExceptionLogonFailed && mailboxContext.IsExplicitLogon)
                {
                    message      = Strings.GetLocalizedString(882888134);
                    messageId    = new Strings.IDs?(882888134);
                    supportLevel = new SupportLevel?(SupportLevel.TenantAdmin);
                }
                else
                {
                    message      = Strings.GetLocalizedString(198161982);
                    messageId    = new Strings.IDs?(198161982);
                    supportLevel = new SupportLevel?(SupportLevel.Transient);
                }
            }
            else if (exception is SendAsDeniedException)
            {
                message      = Strings.GetLocalizedString(2059222100);
                messageId    = new Strings.IDs?(2059222100);
                supportLevel = new SupportLevel?(SupportLevel.TenantAdmin);
            }
            else if (exception is ADTransientException)
            {
                message      = Strings.GetLocalizedString(634294555);
                messageId    = new Strings.IDs?(634294555);
                supportLevel = new SupportLevel?(SupportLevel.Transient);
            }
            else if (exception is ADOperationException)
            {
                message      = Strings.GetLocalizedString(-256207770);
                messageId    = new Strings.IDs?(-256207770);
                supportLevel = new SupportLevel?(SupportLevel.Unknown);
            }
            else if (exception is DataValidationException)
            {
                message      = Strings.GetLocalizedString(-256207770);
                messageId    = new Strings.IDs?(-256207770);
                supportLevel = new SupportLevel?(SupportLevel.EscalateToSupport);
            }
            else if (exception is SaveConflictException || exception is OwaSaveConflictException)
            {
                message   = Strings.GetLocalizedString(-482397486);
                messageId = new Strings.IDs?(-482397486);
            }
            else if (exception is FolderSaveException)
            {
                message   = Strings.GetLocalizedString(1487149567);
                messageId = new Strings.IDs?(1487149567);
            }
            else if (exception is ObjectValidationException)
            {
                message   = Strings.GetLocalizedString(-1670564952);
                messageId = new Strings.IDs?(-1670564952);
            }
            else if (exception is CorruptDataException)
            {
                message   = Strings.GetLocalizedString(-1670564952);
                messageId = new Strings.IDs?(-1670564952);
            }
            else if (exception is Microsoft.Exchange.Data.Storage.QuotaExceededException || exception is MessageTooBigException)
            {
                message   = Strings.GetLocalizedString(-640701623);
                messageId = new Strings.IDs?(-640701623);
            }
            else if (exception is SubmissionQuotaExceededException)
            {
                message   = Strings.GetLocalizedString(178029729);
                messageId = new Strings.IDs?(178029729);
            }
            else if (exception is MessageSubmissionExceededException)
            {
                message   = Strings.GetLocalizedString(-1381793955);
                messageId = new Strings.IDs?(-1381793955);
            }
            else if (exception is AttachmentExceededException)
            {
                message   = Strings.GetLocalizedString(-2137146650);
                messageId = new Strings.IDs?(-2137146650);
            }
            else if (exception is ResourcesException || exception is NoMoreConnectionsException)
            {
                message      = Strings.GetLocalizedString(-639453714);
                messageId    = new Strings.IDs?(-639453714);
                supportLevel = new SupportLevel?(SupportLevel.EscalateToSupport);
            }
            else if (exception is AccountDisabledException)
            {
                message      = Strings.GetLocalizedString(531497785);
                messageId    = new Strings.IDs?(531497785);
                supportLevel = new SupportLevel?(SupportLevel.TenantAdmin);
            }
            else if (exception is AccessDeniedException)
            {
                message   = Strings.GetLocalizedString(995407892);
                messageId = new Strings.IDs?(995407892);
                AccessDeniedException ex2 = (AccessDeniedException)exception;
                if (ex2.InnerException != null)
                {
                    Exception innerException = ex2.InnerException;
                    if (innerException is MapiExceptionPasswordChangeRequired || innerException is MapiExceptionPasswordExpired)
                    {
                        message   = Strings.GetLocalizedString(540943741);
                        messageId = new Strings.IDs?(540943741);
                    }
                }
                supportLevel = new SupportLevel?(SupportLevel.TenantAdmin);
            }
            else if (exception is InvalidLicenseException)
            {
                message          = string.Format(Strings.GetLocalizedString(468041898), requestContext.UserContext.MailboxIdentity.SafeGetRenderableName());
                messageId        = new Strings.IDs?(468041898);
                messageParameter = requestContext.UserContext.MailboxIdentity.SafeGetRenderableName();
                sendWatsonReport = false;
                supportLevel     = new SupportLevel?(SupportLevel.TenantAdmin);
            }
            else if (exception is TenantAccessBlockedException)
            {
                message          = Strings.GetLocalizedString(1045420842);
                messageId        = new Strings.IDs?(1045420842);
                sendWatsonReport = false;
                supportLevel     = new SupportLevel?(SupportLevel.EscalateToSupport);
            }
            else if (exception is PropertyErrorException)
            {
                message   = Strings.GetLocalizedString(641346049);
                messageId = new Strings.IDs?(641346049);
            }
            else if (exception is OwaInvalidOperationException)
            {
                message   = Strings.GetLocalizedString(641346049);
                messageId = new Strings.IDs?(641346049);
            }
            else if (exception is VirusDetectedException)
            {
                message   = Strings.GetLocalizedString(-589723291);
                messageId = new Strings.IDs?(-589723291);
            }
            else if (exception is VirusScanInProgressException)
            {
                message   = Strings.GetLocalizedString(-1019777596);
                messageId = new Strings.IDs?(-1019777596);
            }
            else if (exception is VirusMessageDeletedException)
            {
                message   = Strings.GetLocalizedString(1164605313);
                messageId = new Strings.IDs?(1164605313);
            }
            else if (exception is OwaExplicitLogonException)
            {
                message          = Strings.GetLocalizedString(882888134);
                messageId        = new Strings.IDs?(882888134);
                sendWatsonReport = false;
                supportLevel     = new SupportLevel?(SupportLevel.TenantAdmin);
            }
            else if (exception is NoReplicaException)
            {
                message   = Strings.GetLocalizedString(1179266056);
                messageId = new Strings.IDs?(1179266056);
            }
            else if (exception is TooManyObjectsOpenedException)
            {
                message      = Strings.GetLocalizedString(-1763248954);
                messageId    = new Strings.IDs?(-1763248954);
                supportLevel = new SupportLevel?(SupportLevel.User);
            }
            else if (exception is OwaUserHasNoMailboxAndNoLicenseAssignedException)
            {
                message      = Strings.GetLocalizedString(115127791);
                messageId    = new Strings.IDs?(115127791);
                supportLevel = new SupportLevel?(SupportLevel.TenantAdmin);
            }
            else if (exception is UserHasNoMailboxException)
            {
                message          = Strings.GetLocalizedString(-765910865);
                messageId        = new Strings.IDs?(-765910865);
                messageParameter = exception.Data["PrimarySmtpAddress"].ToString();
                supportLevel     = new SupportLevel?(SupportLevel.TenantAdmin);
            }
            else if (exception is StorageTransientException)
            {
                message   = Strings.GetLocalizedString(-238819799);
                messageId = new Strings.IDs?(-238819799);
                if (exception.InnerException is MapiExceptionRpcServerTooBusy)
                {
                    sendWatsonReport = false;
                    OwaDiagnostics.LogEvent(ClientsEventLogConstants.Tuple_ErrorMailboxServerTooBusy, string.Empty, new object[]
                    {
                        text,
                        exception.ToString()
                    });
                }
                supportLevel = new SupportLevel?(SupportLevel.Transient);
            }
            else if (exception is RulesTooBigException)
            {
                message   = Strings.GetLocalizedString(-791981113);
                messageId = new Strings.IDs?(-791981113);
            }
            else if (exception is DuplicateActionException)
            {
                message   = Strings.GetLocalizedString(-555068615);
                messageId = new Strings.IDs?(-555068615);
            }
            else if (exception is ConversionFailedException && ((ConversionFailedException)exception).ConversionFailureReason == ConversionFailureReason.CorruptContent)
            {
                message   = Strings.GetLocalizedString(-1670564952);
                messageId = new Strings.IDs?(-1670564952);
            }
            else if (exception is IOException && ErrorHandlerUtilities.IsDiskFullException(exception))
            {
                sendWatsonReport = false;
                message          = Strings.GetLocalizedString(-1729839551);
                messageId        = new Strings.IDs?(-1729839551);
                supportLevel     = new SupportLevel?(SupportLevel.EscalateToSupport);
            }
            else if (exception is StoragePermanentException)
            {
                message   = Strings.GetLocalizedString(861904327);
                messageId = new Strings.IDs?(861904327);
                if (exception.InnerException is MapiPermanentException)
                {
                    DiagnosticContext diagCtx = ((MapiPermanentException)exception.InnerException).DiagCtx;
                    if (diagCtx != null)
                    {
                        lids = diagCtx.ToCompactString();
                    }
                }
                supportLevel = new SupportLevel?(SupportLevel.EscalateToSupport);
            }
            else if (exception is TransientException)
            {
                message      = Strings.GetLocalizedString(-1729839551);
                messageId    = new Strings.IDs?(-1729839551);
                supportLevel = new SupportLevel?(SupportLevel.Transient);
                if (exception.InnerException is MapiRetryableException)
                {
                    DiagnosticContext diagCtx2 = ((MapiRetryableException)exception.InnerException).DiagCtx;
                    if (diagCtx2 != null)
                    {
                        lids = diagCtx2.ToCompactString();
                    }
                }
            }
            else if (exception is HttpException)
            {
                HttpException ex3 = (HttpException)exception;
                message          = string.Format(Strings.GetLocalizedString(1331629462), ex3.GetHttpCode());
                messageId        = new Strings.IDs?(1331629462);
                messageParameter = ex3.GetHttpCode().ToString();
            }
            else if (exception is OverBudgetException)
            {
                sendWatsonReport = false;
                message          = Strings.GetLocalizedString(1856724252);
                messageId        = new Strings.IDs?(1856724252);
            }
            else if (exception is COMException || exception.InnerException is COMException)
            {
                sendWatsonReport = !ErrorHandlerUtilities.ShouldIgnoreException((exception is COMException) ? exception : exception.InnerException);
                message          = Strings.GetLocalizedString(641346049);
                messageId        = new Strings.IDs?(641346049);
                supportLevel     = new SupportLevel?(SupportLevel.EscalateToSupport);
            }
            else if (exception is ThreadAbortException)
            {
                sendWatsonReport = false;
                message          = Strings.GetLocalizedString(641346049);
                messageId        = new Strings.IDs?(641346049);
            }
            else if (exception is FaultException || exception is InvalidSerializedAccessTokenException)
            {
                sendWatsonReport = false;
                message          = exception.Message;
            }
            else if (exception is NonExistentMailboxException)
            {
                sendWatsonReport = false;
                message          = exception.Message;
                supportLevel     = new SupportLevel?(SupportLevel.TenantAdmin);
            }
            else if (exception is SlabManifestException || exception is FlightConfigurationException)
            {
                sendWatsonReport = false;
                message          = Strings.GetLocalizedString(2099558169);
                messageId        = new Strings.IDs?(2099558169);
            }
            else
            {
                sendWatsonReport = true;
                message          = Strings.GetLocalizedString(641346049);
                messageId        = new Strings.IDs?(641346049);
            }
            string empty = string.Empty;

            Strings.IDs?ds          = null;
            bool        siteMailbox = false;
            bool        flag        = ErrorHandlerUtilities.RemedyExceptionHandlingError(exception, requestContext, out empty, out ds, out siteMailbox);

            if (flag)
            {
                message   = empty;
                messageId = ds;
            }
            string groupMailboxDestination = ErrorHandlerUtilities.GetGroupMailboxDestination(exception, requestContext);

            return(new ErrorInformation
            {
                Exception = exception,
                Message = message,
                MessageId = messageId,
                MessageParameter = messageParameter,
                SendWatsonReport = sendWatsonReport,
                SharePointApp = flag,
                SiteMailbox = siteMailbox,
                GroupMailboxDestination = groupMailboxDestination,
                Lids = lids,
                SupportLevel = supportLevel
            });
        }
Пример #12
0
 private void InternalRenderChunk(TextWriter writer, bool error, string errorFlag, Strings.IDs?errorString)
 {
     writer.Write("<div id=\"divChnk\" class=\"vlvChnk\"");
     if (!error)
     {
         VirtualListView2.RenderAttribute(writer, "iSR", this.contents.DataSource.StartRange);
         VirtualListView2.RenderAttribute(writer, "iER", this.contents.DataSource.EndRange);
     }
     else if (!string.IsNullOrEmpty(errorFlag))
     {
         VirtualListView2.RenderAttribute(writer, errorFlag, 1);
     }
     writer.Write(">");
     if (!error)
     {
         this.contents.RenderForVirtualListView(writer);
     }
     else if (errorString != null)
     {
         writer.Write("<div id=\"divNI\">");
         writer.Write(LocalizedStrings.GetHtmlEncoded(errorString.Value));
         writer.Write("</div>");
     }
     writer.Write("</div>");
 }