BasicHttpBinding.Security Property


The .NET API Reference documentation has a new home. Visit the .NET API Browser on to see the new experience.

Gets the type of security used with this binding.

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

Public 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.

The following example gets the Security property.

BasicHttpBinding binding = new BasicHttpBinding();
BasicHttpSecurity security = binding.Security;

Universal Windows Platform
Available since 8
.NET Framework
Available since 3.0
Portable Class Library
Supported in: portable .NET platforms
Available since 2.0
Windows Phone Silverlight
Available since 7.0
Return to top