コード例 #1
0
 protected override void InternalProcessRecord()
 {
     TaskLogger.LogEnter();
     if (!this.Force)
     {
         foreach (ADPropertyDefinition adpropertyDefinition in NewWebServicesVirtualDirectory.HostProperties)
         {
             if (!NewWebServicesVirtualDirectory.IsValidHost(this.DataObject, adpropertyDefinition) && !base.ShouldContinue(Strings.ConfirmationMessageHostCannotBeResolved(adpropertyDefinition.Name)))
             {
                 TaskLogger.LogExit();
                 return;
             }
         }
     }
     if (!(this.DataObject.WindowsAuthentication ?? true))
     {
         if (base.ExchangeRunspaceConfig != null && base.ExchangeRunspaceConfig.ConfigurationSettings != null && (base.ExchangeRunspaceConfig.ConfigurationSettings.ClientApplication == ExchangeRunspaceConfigurationSettings.ExchangeApplication.ECP || base.ExchangeRunspaceConfig.ConfigurationSettings.ClientApplication == ExchangeRunspaceConfigurationSettings.ExchangeApplication.OSP))
         {
             if (!this.Force && !base.ShouldContinue(new LocalizedString(string.Format("{0} {1}", Strings.WarningMessageSetWebServicesVirtualDirectoryWindowsAuthentication(this.Identity.ToString()), Strings.ConfirmationMessageWebServicesVirtualDirectoryContinue))))
             {
                 TaskLogger.LogExit();
                 return;
             }
         }
         else
         {
             this.WriteWarning(Strings.WarningMessageSetWebServicesVirtualDirectoryWindowsAuthentication(this.Identity.ToString()));
             if (!this.Force && !base.ShouldContinue(Strings.ConfirmationMessageWebServicesVirtualDirectoryContinue))
             {
                 TaskLogger.LogExit();
                 return;
             }
         }
     }
     this.DataObject.CertificateAuthentication = null;
     base.InternalProcessRecord();
     base.InternalEnableLiveIdNegotiateAuxiliaryModule();
     if (Datacenter.IsMicrosoftHostedOnly(true))
     {
         string text = string.Format("{0}/{1}", this.DataObject.MetabasePath, "Nego2");
         if (!IisUtility.Exists(text))
         {
             DirectoryEntry directoryEntry = IisUtility.CreateWebDirObject(this.DataObject.MetabasePath, null, "Nego2");
             IisUtility.SetProperty(directoryEntry, "AccessFlags", MetabasePropertyTypes.AccessFlags.Read | MetabasePropertyTypes.AccessFlags.Script, true);
             directoryEntry.CommitChanges();
         }
         ExchangeServiceVDirHelper.SetSplitVirtualDirectoryAuthenticationMethods(this.DataObject, text, new Task.TaskErrorLoggingDelegate(base.WriteError), this.MetabaseSetPropertiesFailureMessage);
         ExchangeServiceVDirHelper.ForceAnonymous(text);
     }
     ExchangeServiceVDirHelper.ForceAnonymous(this.DataObject.MetabasePath);
     ExchangeServiceVDirHelper.EwsAutodiscMWA.OnSetManageWCFEndpoints(this, ExchangeServiceVDirHelper.EwsAutodiscMWA.EndpointProtocol.Ews, this.WSSecurityAuthentication, this.DataObject);
     this.UpdateCompressionSettings();
     TaskLogger.LogExit();
 }
コード例 #2
0
 protected override void InternalProcessRecord()
 {
     TaskLogger.LogEnter();
     if (!this.Force)
     {
         foreach (ADPropertyDefinition adpropertyDefinition in NewWebServicesVirtualDirectory.HostProperties)
         {
             if (!NewWebServicesVirtualDirectory.IsValidHost(this.DataObject, adpropertyDefinition) && !base.ShouldContinue(Strings.ConfirmationMessageHostCannotBeResolved(adpropertyDefinition.Name)))
             {
                 TaskLogger.LogExit();
                 return;
             }
         }
     }
     base.InternalProcessRecord();
     TaskLogger.LogExit();
 }