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.
Assembly: System.ServiceModel (in System.ServiceModel.dll)
Property Value
Type: System.ServiceModel.BasicHttpSecurityThe 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()
Show: