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

<protocols> Element

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

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.


<protocols> 
      <add name="protocolname"/>
      <remove name="protocolname"/>
      <clear>   
</protocols>

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

Attributes

None.

Child Elements

Element Description

add

Adds a specified protocol that an ASP.NET Web service can use to receive request data sent from a client and return response data. By default, only HttpSoap and Documentation are enabled.

clear

Removes all protocols from within the scope of the configuration file.

remove

Removes a specified protocol for handling request and response data from within the scope of the configuration file.

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.

webServices

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

The following example enables all four supported protocols. By default, only HttpSoap and Documentation are enabled. To use HttpPost and HttpGet, you need to enable them as showed in the example below.

<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.