Thursday, December 15, 2011

enable HTTP GET and HTTP POST

HTTP GET and HTTP POST may be enabled by editing the Web.config file for the vroot where the Web service resides. The following configuration enables both HTTP GET and HTTP POST:

<configuration>
    <system.web>
    <webServices>
        <protocols>
            <add name="HttpGet"/>
            <add name="HttpPost"/>
        </protocols>
    </webServices>
    </system.web>
</configuration>
 
Alternatively, you can enable these protocols for all Web services on
    the computer by editing the <protocols> section in Machine.config. The
    following example enables HTTP GET, HTTP POST, and also SOAP and HTTP POST from
    localhost: 
 
<protocols>
 <add name="HttpSoap"/>
 <add name="HttpPost"/>
 <add name="HttpGet"/> 
 <add name="HttpPostLocalhost"/>
      <!-- Documentation enables the documentation/test pages -->
 <add name="Documentation"/>
</protocols>

No comments:

Post a Comment