private bool ValidateRmsVersion(Uri uri, ServiceType serviceType) { if (this.datacenter) { return(true); } using (ServerWSManager serverWSManager = new ServerWSManager(uri, serviceType, null, null, RmsClientManagerUtils.GetLocalServerProxy(this.datacenter), RmsClientManager.AppSettings.RmsSoapQueriesTimeout)) { if (serviceType == ServiceType.CertificationService && serverWSManager.ValidateCertificationServiceVersion()) { return(true); } if (serviceType == ServiceType.LicensingService && serverWSManager.ValidateLicensingServiceVersion()) { return(true); } } return(false); }
private void ValidateRmsVersion(Uri uri, ServiceType serviceType) { if (serviceType == ServiceType.LicensingService) { uri = RmsoProxyUtil.GetLicenseServerRedirectUrl(uri); } if (serviceType == ServiceType.CertificationService) { uri = RmsoProxyUtil.GetCertificationServerRedirectUrl(uri); } if ((this.DataObject.IsChanged(IRMConfigurationSchema.InternalLicensingEnabled) && this.DataObject.InternalLicensingEnabled) || (this.DataObject.IsChanged(IRMConfigurationSchema.LicensingLocation) && serviceType == ServiceType.LicensingService)) { using (ServerWSManager serverWSManager = new ServerWSManager(uri, serviceType, null, null, RmsClientManagerUtils.GetLocalServerProxy(this.datacenter), RmsClientManager.AppSettings.RmsSoapQueriesTimeout)) { if (serviceType == ServiceType.CertificationService && !serverWSManager.ValidateCertificationServiceVersion()) { base.WriteError(new RmsVersionMismatchException(uri), ErrorCategory.InvalidOperation, base.Identity); } if (serviceType == ServiceType.LicensingService && !serverWSManager.ValidateLicensingServiceVersion()) { base.WriteError(new RmsVersionMismatchException(uri), ErrorCategory.InvalidOperation, base.Identity); } } } }