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

Last post 11-02-2009 4:23 PM by ngarvey. 12 replies.

Sort Posts:

  • 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

    02-17-2008, 12:45 AM
    • Contributor
      2,723 point Contributor
    • dba123
    • Member since 12-13-2003, 12:04 AM
    • Posts 1,329

    I don't get this error when I run my default.aspx page using the built in VS web server (VS 2008)

     I do get this error when I load my localhost\default.aspx in my .NET 3.5 Web application on my Vista Ultimate Box using IIS (not the built in VS web server):

    HTTP Error 500.19 - Internal Server Error

    Description: The requested page cannot be accessed because the related configuration data for the page is invalid.

    Error Code: 0x80070021

    Notification: BeginRequest

    Module: IIS Web Core

    Requested URL: http://localhost:80/

    Physical Path: C:\www\Projects\3.5 VS 2008 Beta\Elbalazo\Web

    Logon User: Not yet determined

    Logon Method: Not yet determined

    Handler: Not yet determined

    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".

    Config File: \\?\C:\www\Projects\3.5 VS 2008 Beta\Elbalazo\Web\web.config

    Config Source:
      170:     </modules>
      171:     <handlers>
      172:       <remove name="WebServiceHandlerFactory-Integrated" />
    

    More Information... This error occurs when there is a problem reading the configuration file for the Web server or Web application. In some cases, the event logs may contain more information about what caused this error.


    Server Version Information: Internet Information Services 7.0.

    The handlers section is talking about this in my web.config which I believe is there by default when you create a new web application in the .NET 3.5 framework:

     <!-- 
            The system.webServer section is required for running ASP.NET AJAX under Internet
            Information Services 7.0.  It is not necessary for previous version of IIS.
        -->
      <system.webServer>
        <validation validateIntegratedModeConfiguration="false" />
        <modules>
          <add name="ScriptModule" preCondition="integratedMode" type="System.Web.Handlers.ScriptModule, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
        </modules>
        <handlers>
          <remove name="WebServiceHandlerFactory-Integrated" />
          <add name="ScriptHandlerFactory" verb="*" path="*.asmx" preCondition="integratedMode" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
          <add name="ScriptHandlerFactoryAppServices" verb="*" path="*_AppService.axd" preCondition="integratedMode" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
          <add name="ScriptResource" preCondition="integratedMode" verb="GET,HEAD" path="ScriptResource.axd" type="System.Web.Handlers.ScriptResourceHandler, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
        </handlers>
        <defaultDocument>
          <files>
            <clear />
            <add value="default.aspx" />
            <add value="index.aspx" />
          </files>
        </defaultDocument>
      </system.webServer>
     

    Initially I thought this problem was because I needed to change overrideModeDefault="Deny" to overrideModeDefault="Allow" so I changed all instances of this to Allow in my C:\Windows\System32\inetsrv\config\applicationHost.xml file on my Vista Ultimate machine.  That made this error go away but then the second error stated that a handler that is mapped in my web.config has a problem.

    I then get this second error:

    HTTP Error 404.3 - Not Found

    Description: The page you are requesting cannot be served because of the Multipurpose Internet Mail Extensions (MIME) map policy that is configured on the Web server. The page you requested has a file name extension that is not recognized, and is not allowed.

    Error Code: 0x80070032

    Notification: ExecuteRequestHandler

    Module: StaticFileModule

    Requested URL: http://localhost/Default.aspx

    Physical Path: C:\www\Projects\3.5 VS 2008 Beta\Elbalazo\Web\Default.aspx

    Logon User: Anonymous

    Logon Method: Anonymous

    Handler: StaticFile

    Most likely causes:

    • It is possible that a handler mapping is missing. By default, the static file handler processes all content.
    • The feature you are trying to use may not be installed.
    • The appropriate MIME map is not enabled for the Web site or application. (Warning: Do not create a MIME map for content that users should not download, such as .ASPX pages or .config files.)

    What you can try:

    • In system.webServer/handlers:
    • Ensure that the expected handler for the current page is mapped.
    • Pay careful attention to preconditions (e.g. runtimeVersion, pipelineMode, bitness) and compare them to the settings for your application pool.
    • Pay careful attention to typographical errors in the expected handler line.
    • Please verify that the feature you are trying to use is installed.
    • Verify that the MIME map is enabled or add the MIME map for the Web site using the command-line tool appcmd.exe.
      1. Open a command prompt and change directory to %windir%\system32\inetsrv.
      2. To set a MIME type, use the following syntax: appcmd set config /section:staticContent /+[fileExtension='string',mimeType='string']
      3. The variable fileExtension string is the file name extension and the variable mimeType string is the file type description.
      4. For example, to add a MIME map for a file which has the extension ".xyz", type the following at the command prompt, and then press Enter:
      5. appcmd set config /section:staticContent /+[fileExtension='.xyz',mimeType='text/plain']
      Warning: Ensure that this MIME mapping is needed for your Web server before adding it to the list. Configuration files such as .CONFIG or dynamic scripting pages such as .ASP or .ASPX, should not be downloaded directly and should always be processed through a handler. Other files such as database files or those used to store configuration, like .XML or .MDF, are sometimes used to store configuration information. Determine if clients can download these file types before enabling them.
    • Create a tracing rule to track failed requests for this HTTP status code. For more information about creating a tracing rule for failed requests, click here.

    More Information... This error occurs when the file extension of the requested URL is for a MIME type that is not configured on the server. You can add a MIME type for the file extension for files that are not dynamic scripting pages, database, or configuration files. Process those file types using a handler. You should not allows direct downloads of dynamic scripting pages, database or configuration files.


    Server Version Information: Internet Information Services 7.0.

     

    I have still no clue how to resolve this after trying to look at the web.config and IIS.

    When is Microsoft going to get rid of VB.NET!
  • Re: 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

    02-17-2008, 1:27 AM
    • Star
      8,559 point Star
    • siva_sm
    • Member since 12-20-2007, 11:03 AM
    • Posts 1,256
    Mark replies as answers if they helped you solve the problem.
  • Re: 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

    02-18-2008, 2:54 PM
    • Contributor
      2,723 point Contributor
    • dba123
    • Member since 12-13-2003, 12:04 AM
    • Posts 1,329

    I stated in my initial post that I did that...Please re-read...thanks.

    Also I confirmed that this happens to any web project I create in VS 2008.  I tried just a simple test project and tried to run http://localhost/, same error message in it's out of box default.aspx page for this test project. 

    When is Microsoft going to get rid of VB.NET!
  • Re: 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

    02-18-2008, 3:44 PM
    Answer
    • Contributor
      2,723 point Contributor
    • dba123
    • Member since 12-13-2003, 12:04 AM
    • Posts 1,329

    Good God, I swear I had selected everything in IIS when enabling it but didn't...missed some of the asp.net stuff.  Duh

    http://www.netomatix.com/Development/IIS7_404Error.aspx 

    When is Microsoft going to get rid of VB.NET!
  • Re: 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

    09-06-2008, 9:51 AM
    • Member
      2 point Member
    • ddeputy
    • Member since 11-01-2002, 1:28 PM
    • Wilmington, DE
    • Posts 1

    Received this same issue after installing IIS 7 on Vista Home Premium.  To correct error I changed the following values located in the applicationHost.config file located in Windows\system32\inetsrv.

    Change all of the following values located in section <configSections> --> <sectionGroup name="system.webServer">

    • <section name="handlers" overrideModeDefault="Deny" /> change this value from "Deny" to "Allow"
    • <section name="modules" allowDefinition="MachineToApplication" overrideModeDefault="Deny" /> change this value from "Deny" to "Allow"
  • Re: 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

    10-11-2008, 3:48 PM
    • Member
      22 point Member
    • Gewgala
    • Member since 07-26-2007, 9:18 PM
    • Posts 71

    ddeputy,

    Thank you!  That's exactly what I needed.

  • Re: 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

    11-19-2008, 11:06 AM
    • Participant
      1,710 point Participant
    • Shocker-z
    • Member since 09-17-2007, 3:10 PM
    • Nottingham, England
    • Posts 347

     Great! Thanks did the trick for me too

     

    regards

    Liam

    If you've had a problem then someone else has too. Google is your friend. google for your topic title.
  • Re: 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

    12-17-2008, 4:42 AM
    • Member
      64 point Member
    • rchiu5hk
    • Member since 04-07-2008, 7:12 AM
    • Posts 339

    In windows 2008, where the config should be (applicationhost.config) for handlers allow??? Is there any difference in windows 2008?

  • Re: 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

    01-10-2009, 5:52 PM
    • Member
      602 point Member
    • roni_schuetz
    • Member since 07-12-2002, 5:24 AM
    • Zurich, Switzerland
    • Posts 162

     

    %windir%\system32\inetsrv\config\.               -> thats the location

    regards, roni
    ---
    speed up your applications with distributed caching or replicated caching: http://www.sharedcache.com - its free!
  • Re: 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

    09-10-2009, 10:29 AM

    Thanks, I have been looking fo the solution.

  • Re: 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

    11-01-2009, 1:23 PM
    • Member
      36 point Member
    • mikehac
    • Member since 06-17-2008, 5:43 PM
    • Posts 27

    I did exactly  what is written here,but I still have the second Error "The page you are requesting cannot be served because of the extension configuration. If the page is a script, add a handler. If the file should be downloaded, add a MIME map."

    Is there anybody,who knows how to fix it???

    Thanks.

    Mike
  • Re: 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

    11-01-2009, 1:23 PM
    • Member
      36 point Member
    • mikehac
    • Member since 06-17-2008, 5:43 PM
    • Posts 27

    ddeputy:

    Received this same issue after installing IIS 7 on Vista Home Premium.  To correct error I changed the following values located in the applicationHost.config file located in Windows\system32\inetsrv.

    Change all of the following values located in section <configSections> --> <sectionGroup name="system.webServer">

    • <section name="handlers" overrideModeDefault="Deny" /> change this value from "Deny" to "Allow"
    • <section name="modules" allowDefinition="MachineToApplication" overrideModeDefault="Deny" /> change this value from "Deny" to "Allow"

    I did exactly  what is written here,but I still have the second Error "The page you are requesting cannot be served because of the extension configuration. If the page is a script, add a handler. If the file should be downloaded, add a MIME map."

    Is there anybody,who knows how to fix it???

    Thanks.

    P.S. I use Windows 7

    Mike
  • Re: 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

    11-02-2009, 4:23 PM
    • Member
      2 point Member
    • ngarvey
    • Member since 11-02-2009, 4:14 PM
    • Posts 1

    mikehac:

    I did exactly  what is written here,but I still have the second Error "The page you are requesting cannot be served because of the extension configuration. If the page is a script, add a handler. If the file should be downloaded, add a MIME map."

    Is there anybody,who knows how to fix it???

    Thanks.

    P.S. I use Windows 7

    mikehac,

    I was able to resolve this issue in my own Windows 7 webserver using the Microsoft Web Installer Platform (http://www.microsoft.com/web/downloads/platform.aspx). 

    • From the GUI or finding it in the IIS MMC manager, Click on the Web Platform tab
    • Then click on the Customize link below the Frameworks and Runtimes options. 
    • Select ASP.NET and ASP.NET MVC 1.0 (if necessary)
    • and then click install. 

    Should resolve your issue.  You can also probably do this without using the Web Installer Platform, but this was specifically the way I was able to resolve the same problem.

     

    Regards

Page 1 of 1 (13 items)