BasicHttpSecurityMode Enumeration
Specifies the types of security that can be used with the system-provided BasicHttpBinding binding.
Namespace: System.ServiceModel
Assembly: System.ServiceModel (in System.ServiceModel.dll)
| Member name | Description | |
|---|---|---|
![]() | None | The SOAP message is not secured during transfer. This is the default behavior. |
![]() | Transport | Security is provided using HTTPS. The service must be configured with SSL certificates. The SOAP message is protected as a whole using HTTPS. The service is authenticated by the client using the service’s SSL certificate. |
![]() | TransportWithMessageCredential | This mode provides integrity, confidentiality, and server authentication using HTTPS. The service must be configured with a certificate. Client authentication is provided by SOAP message security. This mode is applicable when the user is authenticating with a UserName or Certificate credential and there is an existing HTTPS deployment for securing message transfer. |
![]() | TransportCredentialOnly | This mode provides only HTTP-based client authentication. It does not provide message integrity or confidentiality. |
The default behavior for BasicHttpBinding is None. To specify another value, use the BasicHttpBinding(BasicHttpSecurityMode) constructor.
'Constructors set with different security modes Dim defaultNoSecurityPDBinding As New PollingDuplexHttpBinding() Dim transportSecurityPDBinding As New PollingDuplexHttpBinding(BasicHttpSecurityMode.Transport) Dim transportCredentialOnlyPDBinding As New PollingDuplexHttpBinding(BasicHttpSecurityMode.TransportCredentialOnly) 'Get the BasicHttpSecurity from the binding Dim defaultSecurity As BasicHttpSecurity = defaultNoSecurityPDBinding.Security Dim transportHttpSecurity As BasicHttpSecurity = transportSecurityPDBinding.Security Dim transportCredentialOnlyHttpSecurity As BasicHttpSecurity = transportCredentialOnlyPDBinding.Security 'Get the defaultSecurityMode Dim defaultSecurityMode As BasicHttpSecurityMode = defaultSecurity.Mode 'Output for binding with no security: None Dim txtdefaultSecurityMode As String = defaultSecurityMode.ToString() 'Get the transportSecurityMode Dim tansportSecurityMode As BasicHttpSecurityMode = transportHttpSecurity.Mode 'Output for binding with transport security: Transport Dim txtTransportSecurityMode As String = tansportSecurityMode.ToString() 'Output txtSecurityMode for binding with transport credential security: TransportCredentialOnly Dim txtTransportCredentialOnlySecurityMode As String = transportCredentialOnlyHttpSecurity.Mode.ToString() 'Change the SecurityMode for a binding defaultSecurityMode = BasicHttpSecurityMode.TransportCredentialOnly 'Output for binding with transport credential only security: TransportCredentialOnly Dim txtChangedSecurityMode As String = defaultSecurityMode.ToString()
For a list of the operating systems and browsers that are supported by Silverlight, see Supported Operating Systems and Browsers.
