// Token: 0x0600019A RID: 410 RVA: 0x00006C8C File Offset: 0x00004E8C protected virtual void LoadSettings() { this.Tracer.TraceDebug <string>(0L, "Start loading {0} settings.", this.LogTypeName); BoolAppSettingsEntry boolAppSettingsEntry = new BoolAppSettingsEntry("LogEnabled", this.DefaultEnabled, this.Tracer); this.Enabled = boolAppSettingsEntry.Value; StringAppSettingsEntry stringAppSettingsEntry = new StringAppSettingsEntry("LogDirectoryPath", Path.Combine(ExchangeSetupContext.LoggingPath, this.LogSubFolderName), this.Tracer); this.DirectoryPath = stringAppSettingsEntry.Value; TimeSpanAppSettingsEntry timeSpanAppSettingsEntry = new TimeSpanAppSettingsEntry("LogFileAgeInDays", TimeSpanUnit.Days, TimeSpan.FromDays(30.0), this.Tracer); this.MaxAge = timeSpanAppSettingsEntry.Value; ByteQuantifiedSizeAppSettingsEntry byteQuantifiedSizeAppSettingsEntry = new ByteQuantifiedSizeAppSettingsEntry("LogDirectorySizeLimit", ByteQuantifiedSize.Parse("100MB"), this.Tracer); this.MaxDirectorySize = byteQuantifiedSizeAppSettingsEntry.Value; ByteQuantifiedSizeAppSettingsEntry byteQuantifiedSizeAppSettingsEntry2 = new ByteQuantifiedSizeAppSettingsEntry("LogFileSizeLimit", ByteQuantifiedSize.Parse("10MB"), this.Tracer); this.MaxFileSize = byteQuantifiedSizeAppSettingsEntry2.Value; ByteQuantifiedSizeAppSettingsEntry byteQuantifiedSizeAppSettingsEntry3 = new ByteQuantifiedSizeAppSettingsEntry("LogCacheSizeLimit", ByteQuantifiedSize.Parse("2MB"), this.Tracer); this.CacheSize = byteQuantifiedSizeAppSettingsEntry3.Value; TimeSpanAppSettingsEntry timeSpanAppSettingsEntry2 = new TimeSpanAppSettingsEntry("LogFlushIntervalInSeconds", TimeSpanUnit.Seconds, TimeSpan.FromSeconds(60.0), this.Tracer); this.FlushInterval = timeSpanAppSettingsEntry2.Value; this.FlushToDisk = true; this.LoadCustomSettings(); this.Tracer.TraceDebug <string>(0L, "{0} settings are loaded successfully.", this.LogTypeName); }
internal static AuditingOpticsLoggerSettings Load() { AuditingOpticsLoggerSettings.Tracer.TraceDebug(0L, "Start loading Auditing Optics log settings."); AuditingOpticsLoggerSettings auditingOpticsLoggerSettings = new AuditingOpticsLoggerSettings(); BoolAppSettingsEntry boolAppSettingsEntry = new BoolAppSettingsEntry("LogEnabled", true, AuditingOpticsLoggerSettings.Tracer); auditingOpticsLoggerSettings.Enabled = boolAppSettingsEntry.Value; StringAppSettingsEntry stringAppSettingsEntry = new StringAppSettingsEntry("LogDirectoryPath", Path.Combine(ExchangeSetupContext.LoggingPath, AuditingOpticsConstants.LoggerComponentName), AuditingOpticsLoggerSettings.Tracer); auditingOpticsLoggerSettings.DirectoryPath = stringAppSettingsEntry.Value; TimeSpanAppSettingsEntry timeSpanAppSettingsEntry = new TimeSpanAppSettingsEntry("LogFileAgeInDays", TimeSpanUnit.Days, TimeSpan.FromDays(30.0), AuditingOpticsLoggerSettings.Tracer); auditingOpticsLoggerSettings.MaxAge = timeSpanAppSettingsEntry.Value; ByteQuantifiedSizeAppSettingsEntry byteQuantifiedSizeAppSettingsEntry = new ByteQuantifiedSizeAppSettingsEntry("LogDirectorySizeLimit", ByteQuantifiedSize.Parse("100MB"), AuditingOpticsLoggerSettings.Tracer); auditingOpticsLoggerSettings.MaxDirectorySize = byteQuantifiedSizeAppSettingsEntry.Value; ByteQuantifiedSizeAppSettingsEntry byteQuantifiedSizeAppSettingsEntry2 = new ByteQuantifiedSizeAppSettingsEntry("LogFileSizeLimit", ByteQuantifiedSize.Parse("10MB"), AuditingOpticsLoggerSettings.Tracer); auditingOpticsLoggerSettings.MaxFileSize = byteQuantifiedSizeAppSettingsEntry2.Value; ByteQuantifiedSizeAppSettingsEntry byteQuantifiedSizeAppSettingsEntry3 = new ByteQuantifiedSizeAppSettingsEntry("LogCacheSizeLimit", ByteQuantifiedSize.Parse("256KB"), AuditingOpticsLoggerSettings.Tracer); auditingOpticsLoggerSettings.CacheSize = byteQuantifiedSizeAppSettingsEntry3.Value; TimeSpanAppSettingsEntry timeSpanAppSettingsEntry2 = new TimeSpanAppSettingsEntry("LogFlushIntervalInSeconds", TimeSpanUnit.Seconds, TimeSpan.FromSeconds(60.0), AuditingOpticsLoggerSettings.Tracer); auditingOpticsLoggerSettings.FlushInterval = timeSpanAppSettingsEntry2.Value; auditingOpticsLoggerSettings.FlushToDisk = true; AuditingOpticsLoggerSettings.Tracer.TraceDebug(0L, "The Auditing Optics log settings are loaded successfully."); return(auditingOpticsLoggerSettings); }
// Token: 0x06000837 RID: 2103 RVA: 0x0001B0B0 File Offset: 0x000192B0 private FolderConfiguration() { this.scriptsPath = new StringAppSettingsEntry("ScriptsPath", "scripts", null).Value; this.resourcesPath = new StringAppSettingsEntry("ResourcesPath", "resources", null).Value; this.rootPath = null; string text = new StringAppSettingsEntry("VDirForResources", null, null).Value; if (!string.IsNullOrEmpty(text)) { if (!text.StartsWith("/")) { text = "/" + text; } try { this.rootPath = HttpContext.Current.Server.MapPath(text); } catch (Exception) { } } if (string.IsNullOrEmpty(this.rootPath)) { this.rootPath = HttpRuntime.AppDomainAppPath; } }
public LogConfigurationBase() { this.enabled = new BoolAppSettingsEntry(this.Component + "Enabled", true, this.Tracer); StringAppSettingsEntry stringAppSettingsEntry = new StringAppSettingsEntry(this.Component + "Path", null, this.Tracer); this.logPath = (stringAppSettingsEntry.Value ?? Path.Combine(ExchangeSetupContext.InstallPath, "Logging\\" + this.Component + "\\")); this.prefix = this.Component + "_" + ApplicationName.Current.UniqueId + "_"; this.maxDirectorySize = new ByteQuantifiedSizeAppSettingsEntry(this.Component + "MaxDirectorySize", ByteQuantifiedSize.FromMB(250UL), this.Tracer); this.maxFileSize = new ByteQuantifiedSizeAppSettingsEntry(this.Component + "MaxFileSize", ByteQuantifiedSize.FromMB(10UL), this.Tracer); this.maxAge = new TimeSpanAppSettingsEntry(this.Component + "MaxAge", TimeSpanUnit.Minutes, TimeSpan.FromDays(30.0), this.Tracer); }
// Token: 0x0600082C RID: 2092 RVA: 0x0003C050 File Offset: 0x0003A250 private void LoadPreCheckInVdirConfiguration() { AttachmentPolicy attachmentPolicy = new AttachmentPolicy(new StringArrayAppSettingsEntry("BlockFileTypes", new string[] { ".vsmacros", ".msh2xml", ".msh1xml", ".ps2xml", ".ps1xml", ".mshxml", ".mhtml", ".psc2", ".psc1", ".msh2", ".msh1", ".aspx", ".xml", ".wsh", ".wsf", ".wsc", ".vsw", ".vst", ".vss", ".vbs", ".vbe", ".url", ".tmp", ".shs", ".shb", ".sct", ".scr", ".scf", ".reg", ".pst", ".ps2", ".ps1", ".prg", ".prf", ".plg", ".pif", ".pcd", ".ops", ".mst", ".msp", ".msi", ".msh", ".msc", ".mht", ".mdz", ".mdw", ".mdt", ".mde", ".mdb", ".mda", ".maw", ".mav", ".mau", ".mat", ".mas", ".mar", ".maq", ".mam", ".mag", ".maf", ".mad", ".lnk", ".ksh", ".jse", ".its", ".isp", ".ins", ".inf", ".htc", ".hta", ".hlp", ".fxp", ".exe", ".der", ".csh", ".crt", ".cpl", ".com", ".cmd", ".chm", ".cer", ".bat", ".bas", ".asx", ".asp", ".app", ".adp", ".ade", ".ws", ".vb", ".js" }, null).Value, new StringArrayAppSettingsEntry("BlockMimeTypes", new string[] { "application/x-javascript", "application/javascript", "application/msaccess", "x-internet-signup", "text/javascript", "application/xml", "application/prg", "application/hta", "text/scriplet", "text/xml" }, null).Value, new StringArrayAppSettingsEntry("ForceSaveFileTypes", new string[] { ".vsmacros", ".msh2xml", ".msh1xml", ".ps2xml", ".ps1xml", ".mshxml", ".mhtml", ".psc2", ".psc1", ".msh2", ".msh1", ".aspx", ".xml", ".wsh", ".wsf", ".wsc", ".vsw", ".vst", ".vss", ".vbs", ".vbe", ".url", ".tmp", ".shs", ".shb", ".sct", ".scr", ".scf", ".reg", ".pst", ".ps2", ".ps1", ".prg", ".prf", ".plg", ".pif", ".pcd", ".ops", ".mst", ".msp", ".msi", ".msh", ".msc", ".mht", ".mdz", ".mdw", ".mdt", ".mde", ".mdb", ".mda", ".maw", ".mav", ".mau", ".mat", ".mas", ".mar", ".maq", ".mam", ".mag", ".maf", ".mad", ".lnk", ".ksh", ".jse", ".its", ".isp", ".ins", ".inf", ".htc", ".hta", ".hlp", ".fxp", ".exe", ".der", ".csh", ".crt", ".cpl", ".com", ".cmd", ".chm", ".cer", ".bat", ".bas", ".asx", ".asp", ".app", ".adp", ".ade", ".ws", ".vb", ".js" }, null).Value, new StringArrayAppSettingsEntry("ForceSaveMimeTypes", new string[] { "Application/x-shockwave-flash", "Application/octet-stream", "Application/futuresplash", "Application/x-director" }, null).Value, new StringArrayAppSettingsEntry("AllowFileTypes", new string[] { ".rpmsg", ".xlsx", ".xlsm", ".xlsb", ".pptx", ".pptm", ".ppsx", ".ppsm", ".docx", ".docm", ".zip", ".xls", ".wmv", ".wma", ".wav", ".vsd", ".txt", ".tif", ".rtf", ".pub", ".ppt", ".png", ".pdf", ".one", ".mp3", ".jpg", ".gif", ".doc", ".bmp", ".avi" }, null).Value, new StringArrayAppSettingsEntry("AllowMimeTypes", new string[0], null).Value, (AttachmentPolicy.Level)Enum.Parse(typeof(AttachmentPolicy.Level), new StringAppSettingsEntry("ActionForUnknownFileAndMIMETypes", "ForceSave", null).Value), new BoolAppSettingsEntry("DirectFileAccessOnPublicComputersEnabled", true, null).Value, new BoolAppSettingsEntry("DirectFileAccessOnPrivateComputersEnabled", true, null).Value, new BoolAppSettingsEntry("ForceWebReadyDocumentViewingFirstOnPublicComputers", false, null).Value, new BoolAppSettingsEntry("ForceWebReadyDocumentViewingFirstOnPrivateComputers", false, null).Value, new BoolAppSettingsEntry("WebReadyDocumentViewingOnPublicComputersEnabled", true, null).Value, new BoolAppSettingsEntry("WebReadyDocumentViewingOnPrivateComputersEnabled", true, null).Value, new StringArrayAppSettingsEntry("WebReadyFileTypes", new string[] { ".xlsx", ".xlsm", ".xlsb", ".pptx", ".pptm", ".ppsx", ".ppsm", ".docx", ".docm", ".xls", ".rtf", ".pdf" }, null).Value, new StringArrayAppSettingsEntry("WebReadyMimeTypes", new string[0], null).Value, new StringArrayAppSettingsEntry("WebReadyDocumentViewingSupportedFileTypes", new string[] { ".xlsx", ".xlsm", ".xlsb", ".pptx", ".pptm", ".ppsx", ".ppsm", ".docx", ".docm", ".xls", ".rtf", ".pdf" }, null).Value, new StringArrayAppSettingsEntry("WebReadyDocumentViewingSupportedMimeTypes", new string[0], null).Value, new BoolAppSettingsEntry("WebReadyDocumentViewingForAllSupportedTypes", false, null).Value); base.AttachmentPolicy = attachmentPolicy; string value = new StringAppSettingsEntry("FilterWebBeaconsAndHtmlForms", "UserFilterChoice", null).Value; this.filterWebBeaconsAndHtmlForms = (WebBeaconFilterLevels)Enum.Parse(typeof(WebBeaconFilterLevels), value); base.DefaultTheme = new StringAppSettingsEntry("DefaultTheme", string.Empty, null).Value; base.SegmentationFlags = (ulong)Enum.Parse(typeof(Feature), new StringAppSettingsEntry("SegmentationFlags", "All", null).Value); base.OutboundCharset = (OutboundCharsetOptions)Enum.Parse(typeof(OutboundCharsetOptions), new StringAppSettingsEntry("OutboundCharset", "AutoDetect", null).Value); base.UseGB18030 = new BoolAppSettingsEntry("UseGB18030", false, null).Value; base.UseISO885915 = new BoolAppSettingsEntry("UseISO885915", false, null).Value; base.InstantMessagingType = (InstantMessagingTypeOptions)Enum.Parse(typeof(InstantMessagingTypeOptions), new StringAppSettingsEntry("InstantMessagingType", "Ocs", null).Value); this.imServerName = new StringAppSettingsEntry("InstantMessagingServerName", string.Empty, null).Value; this.formsAuthenticationEnabled = (new BoolAppSettingsEntry("FormsAuthenticationEnabled", true, null).Value ? 1 : 0); this.publicFoldersEnabledOnThisVdir = new BoolAppSettingsEntry("PublicFoldersEnabled", false, null).Value; this.notificationInterval = new IntAppSettingsEntry("NotificationInterval", 120, null).Value; this.sessionTimeout = new IntAppSettingsEntry("UserContextTimeout", 60, null).Value; }
// Token: 0x06000273 RID: 627 RVA: 0x00008E98 File Offset: 0x00007098 private WacConfiguration() { this.BlockWacViewingThroughUI = new BoolAppSettingsEntry("BlockWacViewingThroughUI", false, ExTraceGlobals.AttachmentHandlingTracer).Value; this.AccessTokenExpirationDuration = new TimeSpanAppSettingsEntry("WacAccessTokenExpirationInMinutes", TimeSpanUnit.Minutes, new TimeSpan(8, 0, 0), ExTraceGlobals.AttachmentHandlingTracer).Value; this.AccessTokenCacheTime = new TimeSpanAppSettingsEntry("WacAccessTokenCacheTimeInMinutes", TimeSpanUnit.Minutes, new TimeSpan(0, 30, 0), ExTraceGlobals.AttachmentHandlingTracer).Value; this.UseHttpsForWacUrl = new BoolAppSettingsEntry("UseHttpsForWacUrl", true, ExTraceGlobals.AttachmentHandlingTracer).Value; this.DiscoveryDataRefreshInterval = new TimeSpanAppSettingsEntry("WacDiscoveryDataRefreshIntervalInMinutes", TimeSpanUnit.Minutes, TimeSpan.FromHours(8.0), ExTraceGlobals.AttachmentHandlingTracer).Value; this.DiscoveryDataRetrievalErrorBaseRefreshInterval = new TimeSpanAppSettingsEntry("WacDiscoveryDataRetrievalErrorBaseRefreshIntervalInMinutes", TimeSpanUnit.Minutes, TimeSpan.FromMinutes(5.0), ExTraceGlobals.AttachmentHandlingTracer).Value; this.MdbCacheInterval = new TimeSpanAppSettingsEntry("WacMdbCacheIntervalInMinutes", TimeSpanUnit.Minutes, TimeSpan.FromMinutes(30.0), ExTraceGlobals.AttachmentHandlingTracer).Value; this.CobaltStoreCleanupInterval = new TimeSpanAppSettingsEntry("WacCobaltStoreCleanupIntervalInHours", TimeSpanUnit.Hours, TimeSpan.FromHours(24.0), ExTraceGlobals.AttachmentHandlingTracer).Value; this.CobaltStoreExpirationInterval = new TimeSpanAppSettingsEntry("WacCobaltStoreExpirationIntervalInHours", TimeSpanUnit.Hours, TimeSpan.FromHours(12.0), ExTraceGlobals.AttachmentHandlingTracer).Value; this.AutoSaveInterval = new TimeSpanAppSettingsEntry("WacAutoSaveIntervalInSeconds", TimeSpanUnit.Seconds, TimeSpan.FromSeconds(180.0), ExTraceGlobals.AttachmentHandlingTracer).Value; this.DiagnosticsEnabled = new BoolAppSettingsEntry("WacDiagnosticsEnabled", false, ExTraceGlobals.AttachmentHandlingTracer).Value; this.EditingEnabled = new BoolAppSettingsEntry("WacEditingEnabled", true, ExTraceGlobals.AttachmentHandlingTracer).Value; this.BlobStoreMemoryBudget = new IntAppSettingsEntry("WacCobaltBlobStoreMemoryBudget", 524288, ExTraceGlobals.AttachmentHandlingTracer).Value; if (this.BlockWacViewingThroughUI) { this.WacDiscoveryEndPoint = null; string text = "BlockWacViewingThroughUI is set to true"; OwaDiagnostics.LogEvent(ClientsEventLogConstants.Tuple_WacConfigurationSetupSuccessful, string.Empty, new object[] { text }); OwaServerTraceLogger.AppendToLog(new WacAttachmentLogEvent(text)); return; } string text2 = new StringAppSettingsEntry("WacUrlHostName", null, ExTraceGlobals.AttachmentHandlingTracer).Value; bool flag = false; if (string.IsNullOrEmpty(text2) && !VariantConfiguration.GetSnapshot(MachineSettingsContext.Local, null, null).OwaDeployment.WacConfigurationFromOrgConfig.Enabled) { flag = true; text2 = WacConfiguration.ReadFromOrganizationConfig(); } if (string.IsNullOrEmpty(text2) || !Uri.TryCreate(text2, UriKind.Absolute, out this.WacDiscoveryEndPoint)) { this.BlockWacViewingThroughUI = true; string text3 = string.Format("The WacUrlHostName was invalid. Expected a valid Uri. Actual value was '{0}'. Value read from '{1}'", text2, flag ? "OrganizationConfig" : "web.config"); OwaDiagnostics.LogEvent(ClientsEventLogConstants.Tuple_WacConfigurationSetupError, string.Empty, new object[] { text3 }); OwaServerTraceLogger.AppendToLog(new WacAttachmentLogEvent(text3)); return; } string value = new StringAppSettingsEntry("WacDataCenterPrefix", null, ExTraceGlobals.AttachmentHandlingTracer).Value; if (!string.IsNullOrEmpty(value)) { this.WacDiscoveryEndPoint = new Uri(string.Format(CultureInfo.InvariantCulture, "{0}?dcPrefix={1}", new object[] { this.WacDiscoveryEndPoint, value })); } string text4 = string.Format("Wac enabled and configured with {0} as the endpoint. Value was read from {1}.", this.WacDiscoveryEndPoint, flag ? "OrganizationConfig" : "web.config"); OwaDiagnostics.LogEvent(ClientsEventLogConstants.Tuple_WacConfigurationSetupSuccessful, string.Empty, new object[] { text4 }); text4 += string.Format(" DiagnosticsEnabled={0}, EditingEnabled={1}", this.DiagnosticsEnabled, this.EditingEnabled); OwaServerTraceLogger.AppendToLog(new WacAttachmentLogEvent(text4)); }