ServiceCredentials.SecureConversationAuthentication Property
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Gets the current settings to be used by a secure conversation.
public:
property System::ServiceModel::Security::SecureConversationServiceCredential ^ SecureConversationAuthentication { System::ServiceModel::Security::SecureConversationServiceCredential ^ get(); };
public System.ServiceModel.Security.SecureConversationServiceCredential SecureConversationAuthentication { get; }
member this.SecureConversationAuthentication : System.ServiceModel.Security.SecureConversationServiceCredential
Public ReadOnly Property SecureConversationAuthentication As SecureConversationServiceCredential
Property Value
A SecureConversationServiceCredential instance.
Examples
The following code shows how to use this property to get the instance of the credential used by the service.
// Create a service host.
Uri httpUri = new Uri("http://localhost/Calculator");
ServiceHost sh = new ServiceHost(typeof(Calculator), httpUri);
// Create a binding that uses a WindowsServiceCredential .
WSHttpBinding b = new WSHttpBinding(SecurityMode.Message);
b.Security.Message.ClientCredentialType = MessageCredentialType.Windows;
// Add an endpoint.
sh.AddServiceEndpoint(typeof(ICalculator), b, "WindowsCalculator");
// Get a reference to the WindowsServiceCredential object.
SecureConversationServiceCredential ssCredential =
sh.Credentials.SecureConversationAuthentication;
' Create a service host.
Dim httpUri As New Uri("http://localhost/Calculator")
Dim sh As New ServiceHost(GetType(Calculator), httpUri)
' Create a binding that uses a WindowsServiceCredential .
Dim b As New WSHttpBinding(SecurityMode.Message)
b.Security.Message.ClientCredentialType = MessageCredentialType.Windows
' Add an endpoint.
sh.AddServiceEndpoint(GetType(ICalculator), b, "WindowsCalculator")
' Get a reference to the WindowsServiceCredential object.
Dim ssCredential As SecureConversationServiceCredential = sh.Credentials.SecureConversationAuthentication
Remarks
Use this class to specify a list of known claim types for the Security Context Token (SCT) cookies serialization and an encoder to encode and secure cookies information.
Applies to
GitHub에서 Microsoft와 공동 작업
이 콘텐츠의 원본은 GitHub에서 찾을 수 있으며, 여기서 문제와 끌어오기 요청을 만들고 검토할 수도 있습니다. 자세한 내용은 참여자 가이드를 참조하세요.
.NET