0

I trying to configure IIS but when I run the project this error appeared : Error Code 0x80070021 HTTP Error 500.19 - Internal Server Error

enter image description here

May I know the cause and solution for this?

This is example of TraceLogFiles

enter image description here

There was an error while performing this operation.

This configuration section cannot be used at this path. This happens when the 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”.

samwu
  • 3,857
  • 3
  • 11
  • 25
cui
  • 23
  • 4
  • You might want to enable Faild Request Logging to see where the error is coming from: https://learn.microsoft.com/en-us/iis/troubleshoot/using-failed-request-tracing/troubleshooting-failed-requests-using-tracing-in-iis – Sasha Dec 06 '21 at 07:29
  • 1
    Hi @Sasha I have a Trace logs it says that There was an error while performing this operation. This configuration section cannot be used at this path. This happens when the 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”. – cui Dec 06 '21 at 07:55
  • There is a question on SO that digs into this IIS issue. Could you please check if it hepls in your case: https://stackoverflow.com/questions/9794985/config-error-this-configuration-section-cannot-be-used-at-this-path – Sasha Dec 06 '21 at 10:21

1 Answers1

0

Cause:

This problem can occur if the specified portion of the IIS configuration file is locked at a higher configuration level.

Resolution:

  1. You can first modify the attribute of allowOverride according to the error message in frt.

    • Open %SystemRoot%\System32\inetsrv\config\applicationHost.config

    • Search for the statements below and change the allowOverride attribute from Deny to Allow

      <section name="handlers" allowOverride="Deny" />
      <section name="modules" allowOverride="Deny" />
      
    • Restart IIS

  2. If the above method does not work, you can unlock the specified section, or don't use it at the higher level. For more information about configuration locking, see How to Use Locking in IIS 7.0 Configuration.

samwu
  • 3,857
  • 3
  • 11
  • 25