BasicHttpBinding.Security BasicHttpBinding.Security BasicHttpBinding.Security BasicHttpBinding.Security Property

定义

获取与此绑定一起使用的安全类型。Gets the type of security used with this binding.

public:
 property System::ServiceModel::BasicHttpSecurity ^ Security { System::ServiceModel::BasicHttpSecurity ^ get(); };
public System.ServiceModel.BasicHttpSecurity Security { get; }
member this.Security : System.ServiceModel.BasicHttpSecurity
Public ReadOnly Property Security As BasicHttpSecurity

属性值

与此绑定一起使用的 BasicHttpSecurityThe BasicHttpSecurity that is used with this binding. 默认值为 NoneThe default value is None.

示例

下面的示例获取 Security 属性。The following example gets the Security property.

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

注解

默认情况下,不会对 SOAP 消息进行保护,也不会对客户端进行身份验证。By default, the SOAP message is not secured and the client is not authenticated. 若要使用非默认的安全类型,请使用 BasicHttpBinding(BasicHttpSecurityMode) 构造函数。To use a non-default type of security, use the BasicHttpBinding(BasicHttpSecurityMode) constructor.

适用于