Export (0) Print
Expand All
This topic has not yet been rated - Rate this topic

<add> Element for <protocols>

This topic is specific to a legacy technology. XML Web services and XML Web service clients should now be created using Windows Communication Foundation .

Adds a specified protocol that an ASP.NET Web service can use to receive request data sent from a client and return response data. A protocol can be used to associate request data with a method and its parameters and to associate response data with the method and its return value.


<add name="protocol name"/>

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

Attributes

Attribute Description

name

Required attribute.

The name of the protocol to add.

Child Elements

None.

Parent Elements

Element Description

configuration

The root element in every configuration file used by the common language runtime and .NET Framework applications.

system.web

Specifies the root element for the ASP.NET configuration section. Contains configuration elements that configure ASP.NET Web applications and control how the applications behave.

webServices

Controls the settings of Web services deployed using ASP.NET and of Web service clients running on the .NET Framework.

protocols

Specifies the protocols that an ASP.NET Web service can use to receive request data sent from a client and return response data. A protocol can be used to associate request data with a method and its parameters and to associate response data with the method and its return value.

All four possible protocols make use of HTTP/1.1 (Hypertext Transfer Protocol) as their transport. Literally, the HttpGet and HttpPost protocol values use the GET and POST methods of HTTP. The HttpSoap value also uses the POST method, but without the traditional HTTP POST semantics used by an HTML form.

The following example enables all four supported protocols.

<configuration>
   <system.web>
      <webServices>
         <protocols>
            <add name="HttpSoap"/>
            <add name="HttpPost"/>
            <add name="HttpGet"/>
            <add name="Documentation"/>
         </protocols>
      </webServices>
   </system.web>
</configuration>
Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

ADD
Show:
© 2014 Microsoft. All rights reserved.