0

I have found a related solution here

Also there are possible new security procedures in play here, it could be local host is being locked down and this is also being checked on.

We do not have ipsecurity in play but what is displaying is a 500.19 error "The requested page cannot be accessed because the related configuration data for the page is invalid."

The config source points to the handlers tag on line 56 of our web.config as the bone of contention. modules tag just above it in the sytem.WebServer section.

I did, similar to the article referenced, set 'handlers' and 'modules' in applicationhost.config to "Allow" from "Deny". But for whatever reason I have -5- of these config file to pick from. Not knowing which VS 2022 is trying to work with I changed all 5.

Before these edits, if I tried to drill into these sections via the config editor in IIS, I would get the same error text. Now that these "Allow" values are set, I can drill in with IIS Manager | Config Editor and not get any errors.

This seems to indicate IIS just isn't letting local host do anything. Even with these edits, I can't get local host to fire up.

Here is a screen shot of the error:

enter image description here

Here is the code in the web.config:

    <system.webServer>
    <modules>
        <add name="Spring" type="Spring.Context.Support.WebSupportModule, Spring.Web" preCondition="managedHandler" />
        <add name="SecurityFilter" type="XXXX.XXXX.Domain.Security.SecurityFilter, XXXX.XXXX.Domain" preCondition="managedHandler" />
    </modules>
    <handlers>
        <add name="*.aspx_*" path="*.aspx" verb="*" type="Spring.Web.Support.PageHandlerFactory, Spring.Web" preCondition="integratedMode,runtimeVersionv2.0" />
    </handlers>

Here is the code with handlers and modules modified from one of the applicationhost.config files:

        <sectionGroup name="system.webServer">
        <section name="asp" overrideModeDefault="Deny" />
        <section name="caching" overrideModeDefault="Allow" />
        <section name="cgi" overrideModeDefault="Deny" />
        <section name="defaultDocument" overrideModeDefault="Allow" />
        <section name="directoryBrowse" overrideModeDefault="Allow" />
        <section name="fastCgi" allowDefinition="AppHostOnly" overrideModeDefault="Deny" />
        <section name="globalModules" allowDefinition="AppHostOnly" overrideModeDefault="Deny" />
        <section name="handlers" overrideModeDefault="Allow" />
        <section name="httpCompression" overrideModeDefault="Allow" allowDefinition="Everywhere" />
        <section name="httpErrors" overrideModeDefault="Allow" />
        <section name="httpLogging" overrideModeDefault="Deny" />
        <section name="httpProtocol" overrideModeDefault="Allow" />
        <section name="httpRedirect" overrideModeDefault="Allow" />
        <section name="httpTracing" overrideModeDefault="Deny" />
        <section name="isapiFilters" allowDefinition="MachineToApplication" overrideModeDefault="Deny" />
        <section name="modules" allowDefinition="MachineToApplication" overrideModeDefault="Allow" />
user1585204
  • 713
  • 7
  • 12
  • Different VS releases use different config file locations, https://docs.jexusmanager.com/getting-started/features.html#add-iis-express-from-visual-studio-2015-2017-2019-solution-file – Lex Li May 25 '22 at 18:22

1 Answers1

0

I see this in your error message:

Config Error: 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"

There are many reasons for this error, you can try the following methods to solve the problem.

  1. In the search box, enter "Turn windows features on or off"
  2. In the features window, look for "Internet Information Services"
  3. Click: "World Wide Web Services"
  4. Click: "Application Development Features"
  5. Check (enable) the features. I checked all but CGI.

If this method does not work, you can still try this:

  1. Open IIS Manager and click the server name in the tree on the left.

  2. Right hand pane, Management section, double click Configuration Editor.

  3. At the top, choose the section system.webServer/security/authentication/anonymousAuthentication click Unlock Section in the right.

  4. At the top, choose the section system.webServer/security/authentication/windowsAuthentication click Unlock Section in the right.

JennyDai
  • 486
  • 5