다음을 통해 공유


<httpTransport>

Specifies an HTTP transport for transmitting SOAP messages for a custom binding.

<system.serviceModel>

  <bindings>

    <customBinding>

      <binding>

        <httpTransport>

                                    
                                    <httpTransport
                                
                                    
                                        allowCookies=Boolean"
                                
                                    
                                        authenticationScheme="Digest/Negotiate/Ntlm/Basic/Anonymous"
                                
                                    
                                        bypassProxyOnLocal=Boolean"
                                
                                    
                                        hostnameComparisonMode="StrongWildcard/Exact/WeakWildcard"
                                
                                    
                                        keepAliveEnabled="Boolean"
                                
                                    
                                        maxBufferSize="Integer"
                                
                                    
                                        proxyAddress="Uri"
                                
                                    
                                        proxyAuthenticationScheme="None/Digest/Negotiate/Ntlm/Basic/Anonymous"
                                
                                    
                                    IntegratedWindowsAuthentication: Specifies Windows authentication"
                                
                                    
                                        realm="String"
                                
                                    
                                        transferMode="Buffered/Streamed/StreamedRequest/StreamedResponse"
                                
                                    
                                            
                                    
                                        unsafeConnectionNtlmAuthentication="Boolean"
                                
                                    
                                            
                                    
                                        useDefaultWebProxy="Boolean" />
                                

Attributes and Elements

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

Attributes

Attribute Description

allowCookies

A Boolean value that specifies whether the client accepts cookies and propagates them on future requests. The default is false.

You can use this attribute when you interact with ASMX Web services that use cookies. In this way, you can be sure that the cookies returned from the server are automatically copied to all future client requests for that service.

authenticationScheme

Specifies the protocol used to authenticate client requests being processed by an HTTP listener. Valid values include the following:

  • Digest: Specifies digest authentication.

  • Negotiate: Negotiates with the client to determine the authentication scheme. If both client and server support Kerberos, it is used; otherwise, NTLM is used.

  • Ntlm: Specifies NTLM authentication.

  • Basic: Specifies basic authentication.

  • Anonymous: Specifies anonymous authentication.

The default is Anonymous. This attribute is of type AuthenticationSchemes. This attribute can only be set once.

bypassProxyOnLocal

A Boolean value that indicates whether to bypass the proxy server for local addresses. The default is false.

A local address is one that is on the local LAN or intranet.

Windows Communication Foundation (WCF) always ignores the proxy if the service address begins with https://localhost.

You should use the host name rather than localhost if you want clients to go through a proxy when talking to services on the same machine.

hostnameComparisonMode

Specifies the HTTP hostname comparison mode used to parse URIs. Valid values are,

  • StrongWildcard: (“+”) matches all possible hostnames in the context of the specified scheme, port and relative URI.

  • Exact: no wildcards

  • WeakWildcard: (“*”) matches all possible hostname in the context of the specified scheme, port and relative UIR that have not been matched explicitly or through the strong wildcard mechanism.

The default is StrongWildcard. This attribute is of type HostnameComparisonMode.

keepAliveEnabled

A Boolean value that specifies whether to make a persistent connection to the internet resource.

maxBufferSize

A positive integer that specifies the maximum size of the buffer. The default is 524288

proxyAddress

A URI that specifies the address of the HTTP proxy. If useSystemWebProxy is true, this setting must be null. The default is null.

proxyAuthenticationScheme

Specifies the protocol used for authenticating client requests being processed by an HTTP proxy. Valid values include the following:

  • None: No authentication is performed.

  • Digest: Specifies digest authentication.

  • Negotiate: Negotiates with the client to determine the authentication scheme. If both client and server support Kerberos, it is used; otherwise, NTLM is used.

  • Ntlm: Specifies NTLM authentication.

  • Basic: Specifies basic authentication.

  • Anonymous: Specifies anonymous authentication.

  • IntegratedWindowsAuthentication: Specifies Windows authentication.

The default is Anonymous. This attribute is of type AuthenticationSchemes.

realm

A string that specifies the realm to use on the proxy/server. The default is an empty string.

Servers use realms to partition protected resources. Each partition can have its own authentication scheme and/or authorization database. Realms are used only for basic and digest authentication. After a client successfully authenticates, the authentication is valid for all resources in a given realm. For a detailed description of realms, see RFC 2617 at http://www.ietf.org.

transferMode

Specifies whether messages are buffered or streamed or a request or response. Valid values include the following:

  • Buffered: The request and response messages are buffered.

  • Streamed: The request and response messages are streamed.

  • StreamedRequest: The request message is streamed and the response message is buffered.

  • StreamedResponse: The request message is buffered and the response message is streamed.

The default is Buffered. This attribute is of type TransferMode .

unsafeConnectionNtlmAuthentication

A Boolean value that specifies whether Unsafe Connection Sharing is enabled on the server. The default is false. If enabled, NTLM authentication is performed once on each TCP connection.

useDefaultWebProxy

A Boolean value that specifies whether the machine-wide proxy settings are used rather than the user specific settings. The default is true.

Child Elements

None

Parent Elements

Element Description

<binding>

Defines all binding capabilities of the custom binding.

See Also

Reference

HttpTransportElement

Footer image

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