public void Clean(IList <string> rootDirectories) { if (this.IsCleaningOverdue()) { lock (CobaltStoreCleaner.syncObject) { if (this.IsCleaningOverdue()) { SimulatedWebRequestContext.ExecuteWithoutUserContext("WAC.CleanCobaltStore", delegate(RequestDetailsLogger logger) { WacUtilities.SetEventId(logger, "WAC.CleanCobaltStore"); foreach (string text in rootDirectories) { CobaltStoreCleaner.ValidatePath(text); try { this.CleanRootDirectory(text); } catch (DirectoryNotFoundException) { } } }); } } } }
// Token: 0x0600019F RID: 415 RVA: 0x0000706A File Offset: 0x0000526A private void TimerCallback(object unused) { SimulatedWebRequestContext.ExecuteWithoutUserContext("WAC.AutoSave", delegate(RequestDetailsLogger logger) { WacUtilities.SetEventId(logger, "WAC.AutoSave"); logger.ActivityScope.SetProperty(OwaServerLogger.LoggerData.PrimarySmtpAddress, this.smtpAddress); logger.ActivityScope.SetProperty(WacRequestHandlerMetadata.ExchangeSessionId, this.exchangeSessionId); this.SaveAndLogExceptions(logger); }); }
// Token: 0x06000205 RID: 517 RVA: 0x00007F14 File Offset: 0x00006114 private bool TryExecuteWithNewLogger(out Dictionary <Guid, string> result) { Dictionary <Guid, string> paths = null; SimulatedWebRequestContext.ExecuteWithoutUserContext("WAC.MdbCacheUpdate", delegate(RequestDetailsLogger logger) { WacUtilities.SetEventId(logger, "WAC.MdbCacheUpdate"); ADNotificationAdapter.RunADOperation(delegate() { paths = this.ExecuteQuery(logger); }); }); result = paths; return(result != null); }
internal static void OnCacheEntryExpired(CachedAttachmentInfo attachmentInfo) { SimulatedWebRequestContext.ExecuteWithoutUserContext("WAC.CacheEntryExpired", delegate(RequestDetailsLogger logger) { WacUtilities.SetEventId(logger, "WAC.CacheEntryExpired"); logger.ActivityScope.SetProperty(OwaServerLogger.LoggerData.PrimarySmtpAddress, attachmentInfo.MailboxSmtpAddress); CobaltStore store = attachmentInfo.CobaltStore; ADOperationResult adoperationResult = ADNotificationAdapter.TryRunADOperation(delegate() { store.Saver.SaveAndLogExceptions(logger); }); store.Dispose(); Exception exception = adoperationResult.Exception; if (exception != null) { logger.ActivityScope.SetProperty(ServiceCommonMetadata.GenericErrors, exception.ToString()); } }); }
void IHttpHandler.ProcessRequest(HttpContext context) { RequestDetailsLogger logger = OwaApplication.GetRequestDetailsLogger; string text = context.Request.QueryString["UserEmail"]; logger.ActivityScope.SetProperty(OwaServerLogger.LoggerData.PrimarySmtpAddress, text); WacUtilities.SetEventId(logger, "WAC.BadRequest"); context.Response.TrySkipIisCustomErrors = true; try { if (WacActiveMonitoringHandler.IsWacActiveMonitoringRequest(context.Request, context.Response)) { WacUtilities.SetEventId(logger, "WAC.ActiveMonitoring"); } else { WacRequest wacRequest = WacRequest.ParseWacRequest(text, context.Request); WacRequestHandler.SetCommonResponseHeaders(wacRequest, context.Response); string text2 = wacRequest.GetElapsedTime().TotalHours.ToString("0.00"); logger.ActivityScope.SetProperty(WacRequestHandlerMetadata.SessionElapsedTime, text2); if (wacRequest.IsExpired()) { throw new OwaInvalidRequestException(string.Concat(new object[] { "Can't process ", wacRequest.RequestType, " request because the Url has expired. Hours since start: ", text2 })); } logger.Set(WacRequestHandlerMetadata.ExchangeSessionId, wacRequest.ExchangeSessionId); switch (wacRequest.RequestType) { case WacRequestType.CheckFile: WacUtilities.SetEventId(logger, "WAC.CheckFile"); WacRequestHandler.ProcessCheckFileRequest(context, wacRequest, logger); goto IL_28B; case WacRequestType.GetFile: WacUtilities.SetEventId(logger, "WAC.GetFile"); WacRequestHandler.ProcessGetFileRequest(context, wacRequest, logger); goto IL_28B; case WacRequestType.Lock: WacUtilities.SetEventId(logger, "WAC.Lock"); WacRequestHandler.IncrementLockCount(wacRequest); goto IL_28B; case WacRequestType.UnLock: WacUtilities.SetEventId(logger, "WAC.Unlock"); WacRequestHandler.DecrementLockCount(wacRequest); goto IL_28B; case WacRequestType.RefreshLock: WacUtilities.SetEventId(logger, "WAC.RefreshLock"); goto IL_28B; case WacRequestType.PutFile: WacUtilities.SetEventId(logger, "WAC.PutFile"); WacRequestHandler.ReplaceAttachmentContent(context.Request.InputStream, wacRequest); goto IL_28B; case WacRequestType.Cobalt: WacUtilities.SetEventId(logger, "WAC.Cobalt"); WacRequestHandler.ProcessCobaltRequest(context, wacRequest, delegate(Enum key, string value) { logger.ActivityScope.SetProperty(key, value); }); goto IL_28B; case WacRequestType.DeleteFile: WacUtilities.SetEventId(logger, "WAC.DeleteFile"); throw new OwaInvalidRequestException("Exchange does not support WAC's DeleteFile operation."); } WacUtilities.SetEventId(logger, "WAC.Unknown"); throw new OwaInvalidRequestException("Invalid request type"); IL_28B :; } } catch (Exception ex) { logger.ActivityScope.SetProperty(ServiceCommonMetadata.GenericErrors, ex.ToString()); logger.ActivityScope.SetProperty(WacRequestHandlerMetadata.RequestUrl, context.Request.Url.ToString()); logger.ActivityScope.SetProperty(WacRequestHandlerMetadata.UserAgent, context.Request.UserAgent); context.Response.Headers["X-WOPI-ServerError"] = ex.ToString(); if (ex is OwaInvalidRequestException || ex is OwaOperationNotSupportedException || ex is OverBudgetException) { context.Response.StatusCode = 404; } else { context.Response.StatusCode = 500; } } finally { logger.ActivityScope.SetProperty(WacRequestHandlerMetadata.WopiServerName, context.Request.Headers["X-WOPI-ServerVersion"]); logger.ActivityScope.SetProperty(WacRequestHandlerMetadata.WopiClientVersion, context.Request.Headers["X-WOPI-InterfaceVersion"]); logger.ActivityScope.SetProperty(WacRequestHandlerMetadata.WopiCorrelationId, context.Request.Headers["X-WOPI-CorrelationID"]); } }