Export (0) Print
Expand All
Expand Minimize
0 out of 1 rated this helpful - Rate this topic

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)
'Declaration
Public Enumeration BasicHttpSecurityMode
Member nameDescription
Supported by Silverlight for Windows PhoneNoneThe SOAP message is not secured during transfer. This is the default behavior.
Supported by Silverlight for Windows PhoneTransportSecurity 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.
Supported by Silverlight for Windows PhoneTransportWithMessageCredentialThis 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.

Supported by Silverlight for Windows PhoneTransportCredentialOnlyThis 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()



Silverlight

Supported in: 5, 4, 3

Silverlight for Windows Phone

Supported in: Windows Phone OS 7.1, Windows Phone OS 7.0

XNA Framework

Supported in: Windows Phone OS 7.0

For a list of the operating systems and browsers that are supported by Silverlight, see Supported Operating Systems and Browsers.

Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

ADD
Show:
© 2014 Microsoft. All rights reserved.