Friday, 16 December 2016

Request format is unrecognized for url unexpectedly ending in asp net webservice

I was working with asp.net web services with .asmx file. I was working fine with the local host system but while i used on prodection was getting these error
Request format is unrecognized for url unexpectedly ending /getAllLocations

I tried these things



<protocols>
          <remove name="Documentation">
          <add name="HttpPost">
 </add></remove></protocols>

But did't worked for me

I tried these solution given of following reference and that worked for me


The .NET-connected Web services support HTTP GET, HTTP POST and SOAP protocols. By default, in .NET Framework 1.0, all three protocols are enabled. By default, in .NET Framework 1.1, HTTP GET and HTTP POST are both disabled. This is for security reasons.


https://support.microsoft.com/en-us/kb/819267
<protocols>
 <add name="HttpSoap"/>
 <add name="HttpPost"/>
 <add name="HttpGet"/> 
 <add name="HttpPostLocalhost"/>
      <!-- Documentation enables the documentation/test pages -->
 <add name="Documentation"/>
</protocols>