Compartilhar via


<add> Element for <protocols>

Adds a transmission protocol that the .NET Framework can use to decrypt data sent from a client browser in the HTTP request. The data sent in an HTTP request to an XML Web service contains method invocation calls and method parameter lists.

<configuration>
   <system.web>
      <webServices>
         <protocols>
            <add>

<add name="protocol name"/>

Required Attribute

Attribute Value Description
name     The name of the protocol to add that can be used to decrypt or deserialize XML Web service method calls and associated parameters.
    HttpGet Adds the HTTP GET protocol. Method names and parameters are passed in the query string that is appended to the request URL after the question mark (?).
    HttpPost Adds the HTTP POST protocol. Method names and parameters are passed in the free format area of the HTTP request.
    HttpSoap Adds the HTTP SOAP protocol.
    Documentation Adds the special Documentation protocol. When this protocol is enabled and the .asmx page is requested directly, ASP.NET runs a helper page to create a documentation page that is delivered to the requesting client.

Example

The following example enables all four currently supported protocols.

<configuration>
   <system.web>
      <webServices>
         <protocols>
            <add name="HttpSoap"/>
            <add name="HttpPost"/>
            <add name="HttpGet"/>
            <add name="Documentation"/>
         </protocols>
      </webServices>
   </system.web>
</configuration>

Requirements

Contained Within: <system.web>

Web Platform: IIS 5.0, IIS 5.1, IIS 6.0

Configuration File: Machine.config, Web.config

Configuration Section Handler: System.Web.Services.Configuration.WebServicesConfigurationSectionHandler

See Also

<protocols> Element | ASP.NET Configuration | ASP.NET Settings Schema