AsymmetricSecurityBindingElement.RecipientTokenParameters 屬性
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
指定收件者的權杖定義。
public:
property System::ServiceModel::Security::Tokens::SecurityTokenParameters ^ RecipientTokenParameters { System::ServiceModel::Security::Tokens::SecurityTokenParameters ^ get(); void set(System::ServiceModel::Security::Tokens::SecurityTokenParameters ^ value); };
public System.ServiceModel.Security.Tokens.SecurityTokenParameters RecipientTokenParameters { get; set; }
member this.RecipientTokenParameters : System.ServiceModel.Security.Tokens.SecurityTokenParameters with get, set
Public Property RecipientTokenParameters As SecurityTokenParameters
屬性值
SecurityTokenParameters,儲存權杖定義。
範例
下列程式碼示範參考這個屬性的範例。
AsymmetricSecurityBindingElement abe =
(AsymmetricSecurityBindingElement)SecurityBindingElement.
CreateMutualCertificateBindingElement(
MessageSecurityVersion.
WSSecurity10WSTrustFebruary2005WSSecureConversationFebruary2005WSSecurityPolicy11BasicSecurityProfile10);
abe.SetKeyDerivation(false);
X509SecurityTokenParameters istp =
abe.InitiatorTokenParameters as X509SecurityTokenParameters;
if (istp != null)
{
istp.X509ReferenceStyle =
X509KeyIdentifierClauseType.IssuerSerial;
}
X509SecurityTokenParameters rstp =
abe.RecipientTokenParameters as X509SecurityTokenParameters;
if (rstp != null)
{
rstp.X509ReferenceStyle =
X509KeyIdentifierClauseType.IssuerSerial;
}
Dim abe As AsymmetricSecurityBindingElement = CType(SecurityBindingElement.CreateMutualCertificateBindingElement(MessageSecurityVersion.WSSecurity10WSTrustFebruary2005WSSecureConversationFebruary2005WSSecurityPolicy11BasicSecurityProfile10), AsymmetricSecurityBindingElement)
abe.SetKeyDerivation(False)
Dim istp As X509SecurityTokenParameters = TryCast(abe.InitiatorTokenParameters, X509SecurityTokenParameters)
If istp IsNot Nothing Then
istp.X509ReferenceStyle = X509KeyIdentifierClauseType.IssuerSerial
End If
Dim rstp As X509SecurityTokenParameters = TryCast(abe.RecipientTokenParameters, X509SecurityTokenParameters)
If rstp IsNot Nothing Then
rstp.X509ReferenceStyle = X509KeyIdentifierClauseType.IssuerSerial
End If
備註
這個屬性會取得與設定其中包含接收通訊方之權杖屬性的類別。