views:

1394

answers:

1

This is not a question - posting it here for reference:

When consuming a WebService, I got the following error:

Request format is unrecognized for URL unexpectedly ending in /myMethodName

+6  A: 

Found a solution on this website

All you need is to add the following to your web.config

<configuration>
    <system.web>
    <webServices>
        <protocols>
            <add name="HttpGet"/>
            <add name="HttpPost"/>
        </protocols>
    </webServices>
    </system.web>
</configuration>

More info from Microsoft

roman m
would this also work on IIS7 .Net2.0 apps ?
Daniel Brink
i THINK all you need to do is switch <system.web> to <system.webserver>
roman m
i kept it as is and for now the error seems to have gone away. if i see the error again i'll move the webservices configs into the webserver section.
Daniel Brink