Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I migrated a site from IIS6 to Windows Server 2008 R2 IIS7.5. It has an asmx web service, which is working fine locally, but returns this 500 error when called from another machine:

Request format is unrecognized for URL unexpectedly ending in /myMethodName

The solution in previous versions is to add this to the web.config for the protocols needed (typically omitting HttpGet for production):

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

This is posted everywhere, including http://stackoverflow.com/questions/657313/request-format-is-unrecognized-for-url-unexpectedly-ending-in

For IIS7.5, this throws a configuration error; I understand this section doesn't belong, but tried it anyway. I also boiled down the asmx call to a simple hello world. I tested with POST also, just to eliminate any issues with GET.

What is the equivalent for IIS7.5? - either web.config format or the UI button to push would be really helpful.

Thanks, Bob

EDIT for answer: From the help below, this DOES work - it goes in system.web just like it says; not system.webserver.

share|improve this question
add comment

1 Answer

up vote 0 down vote accepted

If you are getting "configuration error" when making the above entries in your IIS 7.5 then you need to look at the error carefully.

I have IIS 7.5 and I just tried adding the same configuration using Configuration Editor and it made an entry in the web.config file under the Default Web Site.

If you can post the exact error from IIS logfile or take a FREB trace, that will help isolate the issue much better.

share|improve this answer
    
Got it, thanks! That was enough of a hint. The error was 500.19 The requested page cannot be accessed because the related configuration data for the page is invalid. I didn't dig deeper since it now works. The above configuration does work - I didn't realize there still is a system.web section (nothing was in it at the time), so I was putting it in system.webserver. I turned off custom errors coincidentally, which created the system.web section, so I noticed it. Put the config above in system.web, and it works. Thanks again. –  goodeye May 25 '10 at 16:03
    
Good I could help. –  Vivek Kumbhar May 25 '10 at 16:43
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.