Configure IIS7.5 to allow calls to asmx web services

21,540

Solution 1

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.

Solution 2

Please run the following command on your server: C:\Windows\Microsoft.NET\Framework64\v4.0.30319\aspnet_regiis.exe –iru

This will re-configure scripts for ASP.NET against a specific .NET version.

Share:
21,540

Related videos on Youtube

goodeye
Author by

goodeye

Updated on September 17, 2022

Comments

  • goodeye
    goodeye over 1 year

    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 https://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.

  • goodeye
    goodeye almost 14 years
    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.
  • MikeT
    MikeT almost 14 years
    Good I could help.
  • Michael Hampton
    Michael Hampton almost 10 years
    Why? What is this supposed to do?
  • Vojtěch Dohnal
    Vojtěch Dohnal about 3 years
    Thanks a lot, that worked!