FederatedMessageSecurityOverHttp.NegotiateServiceCredential Свойство

Определение

Указывает, выполнено ли согласование SSL на уровне сообщений для получения сертификата службы.

public:
 property bool NegotiateServiceCredential { bool get(); void set(bool value); };
public bool NegotiateServiceCredential { get; set; }
member this.NegotiateServiceCredential : bool with get, set
Public Property NegotiateServiceCredential As Boolean

Значение свойства

Значение true, если сертификат службы согласован. Значение false, если сертификат службы доступен по внештатному каналу. Значение по умолчанию — true.

Примеры

В следующем примере кода показано, как получить доступ к этому свойству из привязки и задать для него значение.

// This method creates a WSFederationHttpBinding.
public static WSFederationHttpBinding
    CreateWSFederationHttpBinding(bool isClient)
{
  // Create an instance of the WSFederationHttpBinding.
  WSFederationHttpBinding b = new WSFederationHttpBinding();

  // Set the security mode to Message.
  b.Security.Mode = WSFederationHttpSecurityMode.Message;

  // Set the Algorithm Suite to Basic256Rsa15.
  b.Security.Message.AlgorithmSuite = SecurityAlgorithmSuite.Basic256Rsa15;

  // Set NegotiateServiceCredential to true.
  b.Security.Message.NegotiateServiceCredential = true;
' This method creates a WSFederationHttpBinding.
Public Shared Function CreateWSFederationHttpBinding(ByVal isClient As Boolean) As WSFederationHttpBinding
  ' Create an instance of the WSFederationHttpBinding.
  Dim b As New WSFederationHttpBinding()

  ' Set the security mode to Message.
  b.Security.Mode = WSFederationHttpSecurityMode.Message

  ' Set the Algorithm Suite to Basic256Rsa15.
  b.Security.Message.AlgorithmSuite = SecurityAlgorithmSuite.Basic256Rsa15

  ' Set NegotiateServiceCredential to true.
  b.Security.Message.NegotiateServiceCredential = True

Комментарии

Это свойство указывает, выполняется ли согласование сертификата службы между клиентом и службой автоматически. Если этому свойству присвоено значение true, такое согласование выполняется. Если этому свойству присвоено значение false, то перед взаимодействием со службой необходимо указать сертификат службы на стороне клиента.

Службы должны всегда указывать сертификат.

Если свойству присвоено значение true, согласование SSL на уровне сообщений для сертификата службы выполняется перед отправкой запроса на выдачу маркера безопасности службе маркеров безопасности с использованием свойств IssuerAddress и IssuerBinding (или свойств LocalIssuerAddress и LocalIssuerBinding).

Применяется к