共用方式為


<security> of <basicHttpBinding>

Defines the security capabilities of the <basicHttpBinding>.

<system.serviceModel>

  <bindings>

    <basicHttpBinding>

      <binding>

        <security> of <basicHttpBinding>

                                    
                                    <basicHttpBinding>
                                
                                    
                                       <binding>
                                
                                    
                                              
                                    
                                          <security />
                                
                                    
                                                  
                                    
                                              <message />
                                
                                    
                                                  
                                    
                                              <transport />
                                
                                    
                                              
                                    
                                          </security>
                                
                                    
                                       </binding>
                                
                                    
                                    </basicHttpBinding>
                                

Attributes and Elements

The following sections describe attributes, child elements, and parent elements

Attributes

Attribute Description

mode

Optional. Specifies the type of security that is used. The default is None. This attribute is of type BasicHttpSecurityMode.

mode Attribute

Value Description

None

  • Messages are not secured during transfer.

Transport

Security is provided using HTTPS transport. The SOAP messages are secured using HTTPS. The service is authenticated to the client using the service's X.509 certificate. The client is authenticated using the ClientCredentialType supplied. See the <transport> of <basicHttpBinding>.

Message

Security is provided using SOAP message security. By default, the body is encrypted and signed. For this binding, the system requires that the server certificate be provided to the client out of band. The only valid ClientCredentialType for this binding is Certificate.

TransportWithMessageCredential

Integrity, confidentiality and server authentication are provided by transport security. Client authentication is provided by means of SOAP message security. This mode is relevant when the user is authenticating using username/password and there is an existing HTTP deployment for securing message transfer.

TransportCredentialOnly

This mode does not provide message integrity and confidentiality. It provides http-based client authentication. This mode should be used with caution. It should be used in environments where the transport security is being provided by other means (such as IPSec) and only client authentication is provided by the WCF infrastructure.

Child Elements

Element Description

<transport> of <basicHttpBinding>

Defines the transport security settings for a basic HTTP service. This element corresponds to HttpTransportSecurity.

<message> of <basicHttpBinding>

Defines the message security settings for a basic HTTP service. This element corresponds to BasicHttpMessageSecurity.

Parent Elements


Element Description

binding

The binding element of the <basicHttpBinding>.

See Also

Reference

BasicHttpSecurityElement

Other Resources

Securing Services and Clients
Selecting a Credential Type

Footer image

Send comments about this topic to Microsoft.
© Microsoft Corporation. All rights reserved.