public static void ValidateAsServerVersion(ServerVersion serverVersion) { if (serverVersion.Major < 15) { throw new ConfigurationSettingsUnsupportedVersionException(serverVersion.ToString()); } }
// Token: 0x06001A41 RID: 6721 RVA: 0x0006E618 File Offset: 0x0006C818 public static SeederClient Create(string serverName, string databaseName, string sourceName, ServerVersion serverVersion) { if (!ReplayRpcVersionControl.IsSeedRpcSupported(serverVersion)) { throw new SeederRpcUnsupportedException(serverName, serverVersion.ToString(), ReplayRpcVersionControl.SeedRpcSupportVersion.ToString()); } ExTraceGlobals.SeederClientTracer.TraceDebug <string, ServerVersion>(0L, "SeederClient is now being created for server '{0}' with version '0x{1:x}'.", serverName, serverVersion); ReplayRpcClient rpcClient = null; SeederRpcExceptionWrapper.Instance.ClientRetryableOperation(serverName, delegate { rpcClient = new ReplayRpcClient(serverName); }); return(new SeederClient(serverName, serverVersion, databaseName, sourceName, rpcClient)); }
// Token: 0x06000DE0 RID: 3552 RVA: 0x000540B4 File Offset: 0x000522B4 public override void WriteXml(XmlWriter writer) { ServerVersion serverVersion = new ServerVersion(this.mailboxOwner.MailboxInfo.Location.ServerVersion); writer.WriteStartDocument(); writer.WriteStartElement("CalendarRepairLog"); writer.WriteAttributeString("SchemaVersion", "3.01"); writer.WriteAttributeString("MailboxUser", this.mailboxOwner.Alias); writer.WriteAttributeString("ServerVersion", serverVersion.ToString()); writer.WriteAttributeString("RangeStart", CalendarRepairLogEntryBase.GetDateTimeString(this.rangeStart)); writer.WriteAttributeString("RangeEnd", CalendarRepairLogEntryBase.GetDateTimeString(this.rangeEnd)); writer.WriteAttributeString("TotalLocalMeetings", this.totalLocalMeetings.ToString()); writer.WriteAttributeString("TotalInconsistentMeetings", this.TotalInconsistentMeetings.ToString()); base.WriteChildNodes <CalendarRepairLogMeetingEntry>("Meetings", this.meetingEntries.Values, writer, false, new Pair <string, string> [0]); writer.WriteEndElement(); writer.WriteEndDocument(); }
public void RpccEnableReplayLag(string serverName, Guid dbGuid, ActionInitiatorType actionInitiator) { ServerVersion serverVersion = ReplayRpcClientWrapper.GetServerVersion(serverName); if (!ReplayRpcVersionControl.IsDisableReplayLagRpcSupported(serverVersion)) { ExTraceGlobals.ReplayServiceRpcTracer.TraceError <string, ServerVersion, ServerVersion>(0L, "RpccEnableReplayLag(): RPC to server '{0}' not supported. Server version: {1:x}. Supported version: {2:x}.", serverName, serverVersion, ReplayRpcVersionControl.GetCopyStatusEx4RpcSupportVersion); throw new ReplayLagRpcUnsupportedException(serverName, serverVersion.ToString(), ReplayRpcVersionControl.GetCopyStatusEx4RpcSupportVersion.ToString()); } ReplayRpcClientWrapper.RunRpcOperation(serverName, new Guid?(dbGuid), TasksRpcExceptionWrapper.Instance, delegate(ReplayRpcClient rpcClient) { if (ReplayRpcVersionControl.IsDisableReplayLagRpcV2Supported(serverVersion)) { ExTraceGlobals.ReplayServiceRpcTracer.TraceDebug <string, Guid, ActionInitiatorType>(0L, "RpccEnableReplayLag(): Now making RpccEnableReplayLag2 RPC to server {0} for guid {1} (actionInitiator = {2}).", serverName, dbGuid, actionInitiator); return(rpcClient.RpccEnableReplayLag2(dbGuid, (uint)actionInitiator)); } ExTraceGlobals.ReplayServiceRpcTracer.TraceDebug <string, Guid, ActionInitiatorType>(0L, "RpccEnableReplayLag(): Now making RpccEnableReplayLag RPC to server {0} for guid {1} (actionInitiator = {2}).", serverName, dbGuid, actionInitiator); return(rpcClient.RpccEnableReplayLag(dbGuid)); }); }
// Token: 0x06001A46 RID: 6726 RVA: 0x0006E83C File Offset: 0x0006CA3C public void PrepareDbSeedAndBegin(Guid dbGuid, bool fDeleteExistingLogs, bool fSafeDeleteExistingFiles, bool fAutoSuspend, bool fManualResume, bool fSeedDatabase, bool fSeedCiFiles, string networkId, string seedingPath, string sourceName, bool?compressOverride, bool?encryptOverride, SeederRpcFlags flags = SeederRpcFlags.None) { if (dbGuid == Guid.Empty) { throw new ArgumentException("An invalid Database Guid was specified.", "dbGuid"); } RpcSeederArgs args = new RpcSeederArgs(dbGuid, fDeleteExistingLogs, fAutoSuspend, seedingPath, null, networkId, false, sourceName, null, fManualResume, fSeedDatabase, fSeedCiFiles, compressOverride, encryptOverride, 0, fSafeDeleteExistingFiles, flags); this.ValidateArgs(args); ExTraceGlobals.SeederClientTracer.TraceDebug <RpcSeederArgs>((long)this.GetHashCode(), "PrepareDbSeedAndBegin(): Constructed RpcSeederArgs: {0}", args); RpcErrorExceptionInfo errorInfo = null; RpcSeederStatus seedStatus = null; ServerVersion version = this.GetTestHookServerVersion(); bool isSafeDeleteSupported = ReplayRpcVersionControl.IsSeedRpcSafeDeleteSupported(version); bool isSeedV5Supported = ReplayRpcVersionControl.IsSeedRpcV5Supported(version); SeederRpcExceptionWrapper.Instance.ClientRetryableOperation(this.m_serverName, delegate { if (isSeedV5Supported) { errorInfo = this.m_client.RpccPrepareDatabaseSeedAndBegin5(args, ref seedStatus); return; } if (isSafeDeleteSupported) { errorInfo = this.m_client.RpccPrepareDatabaseSeedAndBegin4(args, ref seedStatus); return; } if (!fSafeDeleteExistingFiles) { errorInfo = this.m_client.RpccPrepareDatabaseSeedAndBegin(args, ref seedStatus); return; } ExTraceGlobals.SeederClientTracer.TraceError <string, ServerVersion, ServerVersion>((long)this.GetHashCode(), "PrepareDbSeedAndBegin(): Server '{0}' does not support SafeDeleteExistingFiles RPC. Server version: {1}. Minimum supported version: {2}", this.m_serverName, version, ReplayRpcVersionControl.SeedRpcSafeDeleteSupportVersion); throw new SeederRpcSafeDeleteUnsupportedException(this.m_serverName, version.ToString(), ReplayRpcVersionControl.SeedRpcSafeDeleteSupportVersion.ToString()); }); SeederRpcExceptionWrapper.Instance.ClientRethrowIfFailed(this.m_databaseName, this.m_serverName, errorInfo); }
internal static BackEndServer GetAnyBackEndServerForVersion <ServiceType>(ServerVersion serverVersion, bool exactVersionMatch, ClientAccessType clientAccessType, bool currentSiteOnly = false) where ServiceType : HttpService { if (serverVersion == null) { throw new ArgumentNullException("version"); } ServiceTopology currentServiceTopology = ServiceTopology.GetCurrentServiceTopology("f:\\15.00.1497\\sources\\dev\\data\\src\\ApplicationLogic\\Cafe\\HttpProxyBackEndHelper.cs", "GetAnyBackEndServerForVersion", 349); string empty = string.Empty; int version = 0; ServerRole serverRoleToLookFor = (serverVersion.Major < 15) ? ServerRole.ClientAccess : ServerRole.Mailbox; if (currentServiceTopology.TryGetRandomServerFromCurrentSite(serverRoleToLookFor, serverVersion.ToInt(), ServiceTopology.RandomServerSearchType.ExactVersion, out empty, out version, "f:\\15.00.1497\\sources\\dev\\data\\src\\ApplicationLogic\\Cafe\\HttpProxyBackEndHelper.cs", "GetAnyBackEndServerForVersion", 358)) { return(new BackEndServer(empty, version)); } if (!exactVersionMatch) { ServerVersion serverVersion2 = new ServerVersion(serverVersion.Major, 0, 0, 0); if (currentServiceTopology.TryGetRandomServerFromCurrentSite(serverRoleToLookFor, serverVersion2.ToInt(), ServiceTopology.RandomServerSearchType.MinimumVersionMatchMajor, out empty, out version, "f:\\15.00.1497\\sources\\dev\\data\\src\\ApplicationLogic\\Cafe\\HttpProxyBackEndHelper.cs", "GetAnyBackEndServerForVersion", 374)) { return(new BackEndServer(empty, version)); } } if (!currentSiteOnly) { HttpService httpService = currentServiceTopology.FindAny <ServiceType>(clientAccessType, (ServiceType service) => service != null && !service.IsFrontEnd && (service.ServerRole & serverRoleToLookFor) == serverRoleToLookFor && !service.IsOutOfService && service.AdminDisplayVersionNumber == serverVersion, "f:\\15.00.1497\\sources\\dev\\data\\src\\ApplicationLogic\\Cafe\\HttpProxyBackEndHelper.cs", "GetAnyBackEndServerForVersion", 389); if (httpService != null) { return(new BackEndServer(httpService.ServerFullyQualifiedDomainName, httpService.ServerVersionNumber)); } if (!exactVersionMatch) { new ServerVersion(serverVersion.Major, 0, 0, 0); httpService = currentServiceTopology.FindAny <ServiceType>(clientAccessType, (ServiceType service) => service != null && !service.IsFrontEnd && (service.ServerRole & serverRoleToLookFor) == serverRoleToLookFor && !service.IsOutOfService && service.ServerVersionNumber > serverVersion.ToInt() && new ServerVersion(service.ServerVersionNumber).Major == serverVersion.Major, "f:\\15.00.1497\\sources\\dev\\data\\src\\ApplicationLogic\\Cafe\\HttpProxyBackEndHelper.cs", "GetAnyBackEndServerForVersion", 408); if (httpService != null) { return(new BackEndServer(httpService.ServerFullyQualifiedDomainName, httpService.ServerVersionNumber)); } } } if (!exactVersionMatch) { ServerVersion higherVersion = new ServerVersion(serverVersion.Major + 1, 0, 0, 0); ServerRole higherVersionServerRoleToLookFor = (higherVersion.Major < 15) ? ServerRole.ClientAccess : ServerRole.Mailbox; if (currentServiceTopology.TryGetRandomServerFromCurrentSite(higherVersionServerRoleToLookFor, higherVersion.ToInt(), ServiceTopology.RandomServerSearchType.MinimumVersion, out empty, out version, "f:\\15.00.1497\\sources\\dev\\data\\src\\ApplicationLogic\\Cafe\\HttpProxyBackEndHelper.cs", "GetAnyBackEndServerForVersion", 431)) { return(new BackEndServer(empty, version)); } if (!currentSiteOnly) { HttpService httpService2 = currentServiceTopology.FindAny <ServiceType>(clientAccessType, (ServiceType service) => service != null && !service.IsFrontEnd && (service.ServerRole & higherVersionServerRoleToLookFor) == higherVersionServerRoleToLookFor && !service.IsOutOfService && service.ServerVersionNumber > higherVersion.ToInt(), "f:\\15.00.1497\\sources\\dev\\data\\src\\ApplicationLogic\\Cafe\\HttpProxyBackEndHelper.cs", "GetAnyBackEndServerForVersion", 444); if (httpService2 != null) { return(new BackEndServer(httpService2.ServerFullyQualifiedDomainName, httpService2.ServerVersionNumber)); } } } string message = string.Format("Unable to find any backend server for version {0}.", serverVersion); throw new ServerNotFoundException(message, serverVersion.ToString()); }
// Token: 0x06005516 RID: 21782 RVA: 0x00133688 File Offset: 0x00131888 private static void AdminDisplayVersionSetter(object value, IPropertyBag propertyBag) { ServerVersion serverVersion = (ServerVersion)value; propertyBag[FrontendTransportServerADSchema.SerialNumber] = serverVersion.ToString(true); }
protected override void InternalValidate() { TaskLogger.LogEnter(new object[] { this.DataObject }); try { base.InternalValidate(); TransactionalRequestJob dataObject = this.DataObject; if (base.IsFieldSet("TargetDatabase")) { ServerVersion serverVersion = new ServerVersion(MapiUtils.FindServerForMdb(dataObject.TargetDatabase.ObjectGuid, null, null, FindServerFlags.None).ServerVersion); if (this.newTargetServerVersion.Major != serverVersion.Major || this.newTargetServerVersion.Minor != serverVersion.Minor) { base.WriteError(new RecipientTaskException(Strings.ErrorCannotRetargetToDifferentVersionServerThanOriginal(this.newTargetServerVersion.ToString(), serverVersion.ToString())), ErrorCategory.InvalidArgument, base.Identity); } } if (base.IsFieldSet("ArchiveTargetDatabase")) { ServerVersion serverVersion2 = new ServerVersion(MapiUtils.FindServerForMdb(dataObject.TargetArchiveDatabase.ObjectGuid, null, null, FindServerFlags.None).ServerVersion); if (this.newArchiveTargetServerVersion.Major != serverVersion2.Major || this.newArchiveTargetServerVersion.Minor != serverVersion2.Minor) { base.WriteError(new RecipientTaskException(Strings.ErrorCannotRetargetToDifferentVersionArchiveServerThanOriginal(this.newArchiveTargetServerVersion.ToString(), serverVersion2.ToString())), ErrorCategory.InvalidArgument, base.Identity); } } } finally { TaskLogger.LogExit(); } }
public void RestoreDefaulHeader() { header.Clear(); header.Add(HeaderFields.Server, serverVersion.ToString()); header.Add(HeaderFields.Connection, "keep-alive"); }
protected override void InternalValidate() { TaskLogger.LogEnter(); try { ExTraceGlobals.CmdletsTracer.TraceDebug <string, DatabaseCopyIdParameter>((long)this.GetHashCode(), "DatabaseCopyStateAction: enter InternalValidate(DB,ident): {0}, {1}", base.DatabaseName, this.Identity); base.InternalValidate(); if (base.HasErrors) { TaskLogger.LogExit(); } else { Database database = this.DataObject.GetDatabase <Database>(); DatabaseAvailabilityGroup dagForDatabase = DagTaskHelper.GetDagForDatabase(database, base.DataSession, new Task.TaskErrorLoggingDelegate(base.WriteError)); DagTaskHelper.PreventTaskWhenTPREnabled(dagForDatabase, this); this.m_UseRpc = ReplayRpcVersionControl.IsSuspendRpcSupported(this.Server.AdminDisplayVersion); ServerVersion serverVersion = this.IsReplayLagManagementOperation ? ReplayRpcVersionControl.GetCopyStatusEx4RpcSupportVersion : ReplayRpcVersionControl.SuspendRpcSupportVersion; if (this.m_UseRpc) { if (this.IsSuspendOperation) { base.WriteVerbose(Strings.SuspendSgcUseRpc(this.Server.AdminDisplayVersion.ToString(), serverVersion.ToString())); } else { base.WriteVerbose(Strings.ResumeSgcUseRpc(this.Server.AdminDisplayVersion.ToString(), serverVersion.ToString())); } } else if (this.IsReplayLagManagementOperation) { base.WriteError(new ReplayLagRpcUnsupportedException(this.Server.Name, this.Server.AdminDisplayVersion.ToString(), ReplayRpcVersionControl.GetCopyStatusEx4RpcSupportVersion.ToString()), ExchangeErrorCategory.ServerOperation, this.Server); } else if (this.IsSuspendOperation) { base.WriteVerbose(Strings.SuspendSgcUseState(this.Server.Name, this.Server.AdminDisplayVersion.ToString(), ReplayRpcVersionControl.SuspendRpcSupportVersion.ToString())); } else { base.WriteVerbose(Strings.ResumeSgcUseState(this.Server.Name, this.Server.AdminDisplayVersion.ToString(), ReplayRpcVersionControl.SuspendRpcSupportVersion.ToString())); } this.IsActivationRpcSupported = ReplayRpcVersionControl.IsActivationRpcSupported(this.Server.AdminDisplayVersion); this.IsRequestSuspend3RpcSupported = ReplayRpcVersionControl.IsRequestSuspend3RpcSupported(this.Server.AdminDisplayVersion); this.IsOperationRunOnSource = false; DatabaseLocationInfo databaseLocationInfo; if (database.ReplicationType == ReplicationType.Remote && RemoteReplayConfiguration.IsServerRcrSource(ADObjectWrapperFactory.CreateWrapper(database), ADObjectWrapperFactory.CreateWrapper(this.Server), out databaseLocationInfo)) { this.IsOperationRunOnSource = true; } ExTraceGlobals.CmdletsTracer.TraceDebug <string>((long)this.GetHashCode(), "DatabaseCopyStateAction: leave InternalValidate: {0}", base.DatabaseName); } } finally { TaskLogger.LogExit(); } }
// Token: 0x06001A0D RID: 6669 RVA: 0x0009688C File Offset: 0x00094A8C public AboutDetails(OwaContext owaContext) { this.details = new List <AboutDetails.Detail>(); HttpRequest request = owaContext.HttpContext.Request; UserContext userContext = owaContext.UserContext; ITopologyConfigurationSession topologyConfigurationSession = Utilities.CreateADSystemConfigurationSessionScopedToFirstOrg(true, ConsistencyMode.IgnoreInvalid); Server server = topologyConfigurationSession.FindLocalServer(); string format = "{0} [{1}]"; string newValue = string.Format(format, userContext.MailboxIdentity.GetOWAMiniRecipient().DisplayName, userContext.MailboxIdentity.GetOWAMiniRecipient().PrimarySmtpAddress); this.details.Add(new AboutDetails.Detail(1932854157, newValue)); if (userContext.MailboxIdentity != userContext.LogonIdentity) { newValue = string.Format(format, userContext.LogonIdentity.SafeGetRenderableName(), userContext.LogonIdentity.CreateADRecipientBySid().PrimarySmtpAddress); this.details.Add(new AboutDetails.Detail(-326055478, newValue)); } this.details.Add(new AboutDetails.Detail(702028774, request.UserAgent)); this.details.Add(new AboutDetails.Detail(1313983647, null, "spnSilverlight")); this.details.Add(new AboutDetails.Detail(-1008891981, "2.0.31005.0")); this.details.Add(new AboutDetails.Detail(287279379, userContext.Experiences[0].Name)); this.details.Add(new AboutDetails.Detail(-580409853, AboutDetails.GetUserLanguage())); this.details.Add(new AboutDetails.Detail(-2080731678, AboutDetails.GetUserTimeZone(userContext))); this.details.Add(new AboutDetails.Detail(-2119715555, userContext.MailboxSession.MailboxOwner.LegacyDn)); this.details.Add(new AboutDetails.Detail(1242327, owaContext.LocalHostName)); this.details.Add(new AboutDetails.Detail(-443267801, Globals.ApplicationVersion)); if (owaContext.IsProxyRequest) { this.details.Add(new AboutDetails.Detail(-115535529, owaContext.ProxyCasUri.ToString())); this.details.Add(new AboutDetails.Detail(1033866607, owaContext.ProxyCasVersion.ToString())); this.details.Add(new AboutDetails.Detail(1725379342, owaContext.ProxyCasUri.Host)); } else { this.details.Add(new AboutDetails.Detail(-1140953118, request.ServerVariables["SERVER_NAME"])); } if (!userContext.IsBasicExperience && Utilities.IsSMimeFeatureUsable(owaContext)) { this.details.Add(new AboutDetails.Detail(-536214884, null, "dvMmVer")); if (OwaRegistryKeys.AllowUserChoiceOfSigningCertificate) { string text; if (userContext.UserOptions.UseManuallyPickedSigningCertificate) { text = AboutDetails.FormatSigningCertificateId(userContext); } else { text = LocalizedStrings.GetNonEncoded(850704157); } if (!string.IsNullOrEmpty(text)) { this.details.Add(new AboutDetails.Detail(2075380721, text)); } } } this.details.Add(new AboutDetails.Detail(585827348, server.Fqdn)); this.details.Add(new AboutDetails.Detail(1747010592, Environment.Version.ToString())); this.details.Add(new AboutDetails.Detail(-1210690029, Environment.OSVersion.ToString())); string text2 = CultureInfo.InstalledUICulture.IetfLanguageTag; if (string.IsNullOrEmpty(text2)) { text2 = string.Empty; } this.details.Add(new AboutDetails.Detail(1325823303, text2)); ServerVersion serverVersion = ServerVersion.CreateFromVersionNumber(server.VersionNumber); this.details.Add(new AboutDetails.Detail(36884659, serverVersion.ToString())); string text3 = Globals.ServerCulture.IetfLanguageTag; if (string.IsNullOrEmpty(text3)) { text3 = string.Empty; } this.details.Add(new AboutDetails.Detail(2002567151, text3)); this.details.Add(new AboutDetails.Detail(-983285290, ExTimeZone.CurrentTimeZone.LocalizableDisplayName.ToString(Thread.CurrentThread.CurrentUICulture))); this.details.Add(new AboutDetails.Detail(-967424827, AboutDetails.GetCASFlavor())); this.details.Add(new AboutDetails.Detail(1832080745, userContext.MailboxSession.MailboxOwner.MailboxInfo.Location.ServerFqdn)); serverVersion = ServerVersion.CreateFromVersionNumber(userContext.MailboxSession.MailboxOwner.MailboxInfo.Location.ServerVersion); this.details.Add(new AboutDetails.Detail(-764368819, serverVersion.ToString())); this.details.Add(new AboutDetails.Detail(584845051, AboutDetails.GetCASRoles(server))); this.details.Add(new AboutDetails.Detail(1023146649, owaContext.UserContext.LogonIdentity.AuthenticationType)); if (owaContext.IsProxyRequest) { this.details.Add(new AboutDetails.Detail(-1163209895, owaContext.HttpContext.User.Identity.AuthenticationType)); } this.details.Add(new AboutDetails.Detail(33982382, owaContext.UserContext.IsPublicLogon ? LocalizedStrings.GetNonEncoded(-1273337393) : LocalizedStrings.GetNonEncoded(1496915101))); bool flag = !VariantConfiguration.GetSnapshot(MachineSettingsContext.Local, null, null).OwaDeployment.HideInternalUrls.Enabled; this.AddEndpointSettings(ServiceType.Pop3, true); if (flag) { this.AddEndpointSettings(ServiceType.Pop3, false); } this.AddEndpointSettings(ServiceType.Imap4, true); if (flag) { this.AddEndpointSettings(ServiceType.Imap4, false); } this.AddEndpointSettings(ServiceType.Smtp, true); if (flag) { this.AddEndpointSettings(ServiceType.Smtp, false); } if (!owaContext.UserContext.IsBasicExperience && FormsRegistryManager.HasCustomForm) { this.details.Add(new AboutDetails.Detail(-308367532, LocalizedStrings.GetNonEncoded(-761624927))); } this.details.Add(new AboutDetails.Detail(2084940277, userContext.SegmentationFlags.ToString("x"))); this.details.Add(new AboutDetails.Detail(1383125876, userContext.RestrictedCapabilitiesFlags.ToString("x"))); }
// Token: 0x06001A47 RID: 6727 RVA: 0x0006EA10 File Offset: 0x0006CC10 public void BeginServerLevelSeed(bool fDeleteExistingLogs, bool fSafeDeleteExistingFiles, int maxSeedsInParallel, bool fAutoSuspend, bool fManualResume, bool fSeedDatabase, bool fSeedCiFiles, bool?compressOverride, bool?encryptOverride, SeederRpcFlags flags = SeederRpcFlags.None) { RpcSeederArgs args = new RpcSeederArgs(Guid.Empty, fDeleteExistingLogs, fAutoSuspend, null, null, string.Empty, false, string.Empty, null, fManualResume, fSeedDatabase, fSeedCiFiles, compressOverride, encryptOverride, maxSeedsInParallel, fSafeDeleteExistingFiles, flags); this.ValidateArgs(args); ExTraceGlobals.SeederClientTracer.TraceDebug <RpcSeederArgs>((long)this.GetHashCode(), "BeginServerLevelSeed(): Constructed RpcSeederArgs: {0}", args); RpcErrorExceptionInfo errorInfo = null; RpcSeederStatus seedStatus = null; ServerVersion version = this.GetTestHookServerVersion(); SeederRpcExceptionWrapper.Instance.ClientRetryableOperation(this.m_serverName, delegate { if (ReplayRpcVersionControl.IsSeedRpcV5Supported(version)) { errorInfo = this.m_client.RpccPrepareDatabaseSeedAndBegin5(args, ref seedStatus); return; } if (ReplayRpcVersionControl.IsSeedRpcSafeDeleteSupported(version)) { errorInfo = this.m_client.RpccPrepareDatabaseSeedAndBegin4(args, ref seedStatus); return; } ExTraceGlobals.SeederClientTracer.TraceError <string, ServerVersion, ServerVersion>((long)this.GetHashCode(), "BeginServerLevelSeed(): Server '{0}' does not support server-level reseed RPC. Server version: {1}. Minimum supported version: {2}", this.m_serverName, version, ReplayRpcVersionControl.SeedRpcSafeDeleteSupportVersion); throw new SeederRpcServerLevelUnsupportedException(this.m_serverName, version.ToString(), ReplayRpcVersionControl.SeedRpcSafeDeleteSupportVersion.ToString()); }); SeederRpcExceptionWrapper.Instance.ClientRethrowIfFailed(this.m_databaseName, this.m_serverName, errorInfo); }
private Dictionary <Guid, RpcDatabaseCopyStatus2> GetCopyStatusRpcResults() { Dictionary <Guid, RpcDatabaseCopyStatus2> result = null; ServerVersion adminDisplayVersion = ReplicationCheckGlobals.Server.AdminDisplayVersion; if (ReplicationCheckGlobals.WriteVerboseDelegate != null) { ReplicationCheckGlobals.WriteVerboseDelegate(Strings.TestRHUseCopyStatusRpc(adminDisplayVersion.ToString(), ReplayRpcVersionControl.GetCopyStatusEx2SupportVersion.ToString())); } RpcDatabaseCopyStatus2[] copyStatus = ReplayRpcClientHelper.GetCopyStatus(base.ServerName, ReplicationCheckGlobals.RunningInMonitoringContext ? RpcGetDatabaseCopyStatusFlags2.None : RpcGetDatabaseCopyStatusFlags2.ReadThrough, null); if (copyStatus != null && copyStatus.Length > 0) { result = ReplayRpcClientHelper.ParseStatusResults(copyStatus); if (ReplicationCheckGlobals.WriteVerboseDelegate != null) { ReplicationCheckGlobals.WriteVerboseDelegate(Strings.TestRHRpcQueryAllDone(copyStatus.Length)); } } return(result); }
internal static List <string> GetMrsServers(IConfigurationSession session, Guid mdbGuid) { DatabaseInformation databaseInformation = MapiUtils.FindServerForMdb(mdbGuid, null, null, FindServerFlags.None); if (databaseInformation.ServerSite == null) { throw new UnableToDetermineMDBSitePermanentException(mdbGuid); } MrsTracer.Common.Debug("MDB '{0}' ({1}) found to belong to Site: '{2}'", new object[] { databaseInformation.DatabaseName, mdbGuid, databaseInformation.ServerSite }); ServerVersion serverVersion = MailboxReplicationServiceClient.minRequiredVersion; QueryFilter filter = new AndFilter(new QueryFilter[] { new BitMaskAndFilter(ServerSchema.CurrentServerRole, 4UL), new ComparisonFilter(ComparisonOperator.NotEqual, ActiveDirectoryServerSchema.IsOutOfService, true), new ComparisonFilter(ComparisonOperator.GreaterThanOrEqual, ServerSchema.VersionNumber, serverVersion.ToInt()), new ComparisonFilter(ComparisonOperator.Equal, ServerSchema.ServerSite, databaseInformation.ServerSite.DistinguishedName) }); Server[] array = session.Find <Server>(null, QueryScope.SubTree, filter, null, 0); if (array == null || array.Length == 0) { MrsTracer.Common.Error("No Client Access servers running an appropriate version of Exchange 2010 (or later) were found in site '{0}'.", new object[] { databaseInformation.ServerSite.ToString() }); throw new ErrorNoCASServersInSitePermanentException(databaseInformation.ServerSite.ToString(), serverVersion.ToString()); } List <string> list = new List <string>(array.Length); foreach (Server server in array) { string fqdn = server.Fqdn; if (!string.IsNullOrEmpty(fqdn)) { list.Add(fqdn); } } return(list); }
internal static void ApplyVersionSetter(object value, IPropertyBag propertyBag) { ServerVersion serverVersion = (ServerVersion)value; propertyBag[MonitoringOverrideSchema.ApplyVersionRaw] = serverVersion.ToString(true); }