Thursday, September 29, 2011

Enable HttpPost in .net Web Service

Will need to add the following to your Web.config:



   <system.web>
   ...
      <webservices>
         <protocols>
            <clear/>
            <add name="HttpSoap">
            <add name="HttpSoap12">
            <add name="HttpPost">
            <add name="HttpGet">
            <add name="Documentation">
            <add name="HttpPostLocalhost">
         </protocols>
      </webservices>
   ...
   </system.web>


If you want to turn off one of the protocols, just comment out that add line. The "Documentation" protocol is the .net generated WSDL.