ASP.net web API publish to IIS return 500.19 [Answered]RSS

3 replies

Last post Apr 19, 2018 03:56 PM by Yor_k

  • ASP.net web API publish to IIS return 500.19

    Apr 18, 2018 03:26 PM|Yor_k|LINK

    I have a web api application on my side and it works perfectly in my development environment. When I publish it to my IIS server, I keep receving the error message

    HTTP Error 500.19 - Internal Server ErrorTherequested page cannot be accessed because the related configuration data for the page is invalid.
    Detailed Error Information: 
    Module
       IIS Web Core
    Notification
       BeginRequest
    Handler
       Not yet determined
    Error Code
       0x80070021
    Config Error
       This configuration section cannot be used at this path. This happens whenthe section is locked at a parent level. Locking is either by default (overrideModeDefault="Deny"), or set explicitly by a location tag with overrideMode="Deny" or the legacy allowOverride="false".     20:   <system.webServer>
       21:     <handlers>
       22:       <remove name="ExtensionlessUrlHandler-Integrated-4.0" />
    </div>

    So how can I handle this? Thanks in advance.

  • Re: ASP.net web API publish to IIS return 500.19

    Apr 18, 2018 09:36 PM|lextm|LINK

    Your development environment might use IIS Express, so its <handlers> tag might be unlocked. However, default IIS installation should have that tag locked.

    You might unlock the section via PowerShell, or manually in IIS Manager,

    https://gist.github.com/dazinator/46ddf29f406bf66bc2b0

    Lex Li
    IIS Consulting Services at https://support.lextudio.com/services/consulting.html
    ---------------------------
    This posting is provided "AS IS" with no warranties, and confers no rights.
  • Re: ASP.net web API publish to IIS return 500.19

    Apr 19, 2018 05:35 AM|Yuk Ding|LINK

    Hi Yor_K,

    Please ensure the application development feature has been installed.

    https://stackoverflow.com/questions/25821187/how-to-solve-http-error-500-19-internal-server-error-remove-name-extensio

    You get this  error due to  a missing IIS feature of  Internet information service->world wide web service application development feature.net extensionsibility.

    Best Regards,

    Yuk Ding

    Yuk Ding

    MSDN Community Support
    Please remember to "Mark as Answer" the responses that resolved your issue.
  • Re: ASP.net web API publish to IIS return 500.19

    Apr 19, 2018 03:56 PM|Yor_k|LINK

    Hi,

    The second solution did the trick. Thank you for your help.