Security Property
Collapse the table of content
Expand the table of content

BasicHttpBinding.Security Property

[ This article is for Windows Phone 8 developers. If you’re developing for Windows 10, see the latest documentation. ]

Gets the type of security used with this binding.

Namespace:  System.ServiceModel
Assembly:  System.ServiceModel (in System.ServiceModel.dll)

'Declaration
Public ReadOnly Property Security As BasicHttpSecurity

Property Value

Type: System.ServiceModel.BasicHttpSecurity
The BasicHttpSecurity that is used with this binding. The default value is None.

By default, the SOAP message is not secured and the client is not authenticated. To use a non-default type of security, use the BasicHttpBinding(BasicHttpSecurityMode) constructor or set the type of security for an existing binding using the Mode property.


			Dim bDefaultHttpBinding As New BasicHttpBinding()
			'Output txtSecurityMode: None
			Dim txtDefaultSecurityMode As String = bDefaultHttpBinding.Security.Mode.ToString()

			Dim bTHttpBinding As New BasicHttpBinding(BasicHttpSecurityMode.Transport)
			'Output txtSecurityMode: Transport
			Dim txtTSecurityMode As String = bTHttpBinding.Security.Mode.ToString()

			Dim bTOHttpBinding As New BasicHttpBinding(BasicHttpSecurityMode.TransportCredentialOnly)
			'Output txtSecurityMode: TransportCredentialOnly
			Dim txtTOSecurityMode As String = bTOHttpBinding.Security.Mode.ToString()



Windows Phone OS

Supported in: 8.1, 8.0, 7.1, 7.0

Windows Phone

Show:
© 2017 Microsoft