none
iis7 - HTTP Error 500.19 - Internal Server Error

    Question

  • I am trying to set up my first web application on IIS 7, I cannot work out what the problem is;

     

    HTTP Error 500.19 - Internal Server Error

    The requested 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 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:\inetpub\wwwroot\TestApp\web.config
    Requested URL http://localhost:80/
    Physical Path C:\inetpub\wwwroot\TestApp
    Logon Method Not yet determined
    Logon User Not yet determined
    Config Source
      100:     <validation validateIntegratedModeConfiguration="false"/>
      101: 		<modules>
      102: 			<remove name="ScriptModule"/>
    
    Links and More Information

     

    Friday, August 22, 2008 2:02 PM

Answers

  • I found the solution.

    Simply change the applicationHost.Config file to this;

    <section name="modules" allowDefinition="MachineToApplication" overrideModeDefault="Allow" />

     

    Then you get a different error, 404.3 Not Found, which I am now looking into.
    Tuesday, August 26, 2008 9:20 AM

All replies

  • I found the solution.

    Simply change the applicationHost.Config file to this;

    <section name="modules" allowDefinition="MachineToApplication" overrideModeDefault="Allow" />

     

    Then you get a different error, 404.3 Not Found, which I am now looking into.
    Tuesday, August 26, 2008 9:20 AM
  • That post was the highlight of my day! thx a million.
    I had read tons of post about this god damn 500.19 error with no success... reinstalled the NET fwk twice... each time facing the same "disappointing" screen...
    Then I followed this instruction and also did the same for the <section name="handlers"... AND IT WORKED!!!!!! (without 404.3 error)

    cheers!
    Saturday, November 29, 2008 4:19 PM
  • Here is the solution to the 404.3 error:

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

    I fell victim to this, too.
    Thursday, January 15, 2009 3:27 AM
  • Hi,

    my web .config is like this:

    <?xml version="1.0"?>
    <!--
        Note: As an alternative to hand editing this file you can use the
        web admin tool to configure settings for your application. Use
        the Website->Asp.Net Configuration option in Visual Studio.
        A full list of settings and comments can be found in
        machine.config.comments usually located in
        \Windows\Microsoft.Net\Framework\v2.x\Config
    -->
    <configuration>


        <configSections>
          <sectionGroup name="system.web.extensions" type="System.Web.Configuration.SystemWebExtensionsSectionGroup, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35">
            <sectionGroup name="scripting" type="System.Web.Configuration.ScriptingSectionGroup, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35">
              <section name="scriptResourceHandler" type="System.Web.Configuration.ScriptingScriptResourceHandlerSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="MachineToApplication"/>
              <sectionGroup name="webServices" type="System.Web.Configuration.ScriptingWebServicesSectionGroup, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35">
                <section name="jsonSerialization" type="System.Web.Configuration.ScriptingJsonSerializationSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="Everywhere" />
                <section name="profileService" type="System.Web.Configuration.ScriptingProfileServiceSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="MachineToApplication" />
                <section name="authenticationService" type="System.Web.Configuration.ScriptingAuthenticationServiceSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="MachineToApplication" />
                <section name="roleService" type="System.Web.Configuration.ScriptingRoleServiceSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="MachineToApplication" />
              </sectionGroup>
            </sectionGroup>
          </sectionGroup>
        </configSections> 


        <appSettings/>
        <connectionStrings/>
        <system.web>
            <!--
                Set compilation debug="true" to insert debugging
                symbols into the compiled page. Because this
                affects performance, set this value to true only
                during development.
            -->
            <compilation debug="false">

              <assemblies>
                <add assembly="System.Core, Version=3.5.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
                <add assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
                <add assembly="System.Data.DataSetExtensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
                <add assembly="System.Xml.Linq, Version=3.5.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
              </assemblies>

            </compilation>
            <!--
                The <authentication> section enables configuration
                of the security authentication mode used by
                ASP.NET to identify an incoming user.
            -->
            <authentication mode="Windows" />
            <!--
                The <customErrors> section enables configuration
                of what to do if/when an unhandled error occurs
                during the execution of a request. Specifically,
                it enables developers to configure html error pages
                to be displayed in place of a error stack trace.

            <customErrors mode="RemoteOnly" defaultRedirect="GenericErrorPage.htm">
                <error statusCode="403" redirect="NoAccess.htm" />
                <error statusCode="404" redirect="FileNotFound.htm" />
            </customErrors>
            -->


          <pages>
            <controls>
              <add tagPrefix="asp" namespace="System.Web.UI" assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
              <add tagPrefix="asp" namespace="System.Web.UI.WebControls" assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
            </controls>
          </pages>

          <httpHandlers>
            <remove verb="*" path="*.asmx"/>
            <add verb="*" path="*.asmx" validate="false" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
            <add verb="*" path="*_AppService.axd" validate="false" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
            <add verb="GET,HEAD" path="ScriptResource.axd" type="System.Web.Handlers.ScriptResourceHandler, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" validate="false"/>
          </httpHandlers>
          <httpModules>
            <add name="ScriptModule" type="System.Web.Handlers.ScriptModule, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
          </httpModules>

           
        </system.web>

        <system.codedom>
          <compilers>
            <compiler language="c#;cs;csharp" extension=".cs" warningLevel="4"
                      type="Microsoft.CSharp.CSharpCodeProvider, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
              <providerOption name="CompilerVersion" value="v3.5"/>
              <providerOption name="WarnAsError" value="false"/>
            </compiler>
            <compiler language="vb;vbs;visualbasic;vbscript" extension=".vb" warningLevel="4"
                      type="Microsoft.VisualBasic.VBCodeProvider, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
              <providerOption name="CompilerVersion" value="v3.5"/>
              <providerOption name="OptionInfer" value="true"/>
              <providerOption name="WarnAsError" value="false"/>
            </compiler>
          </compilers>
        </system.codedom>
       
        <!--
            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>
            <remove name="ScriptModule" />
            <add name="ScriptModule" preCondition="managedHandler" type="System.Web.Handlers.ScriptModule, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
          </modules>
          <handlers>
            <remove name="WebServiceHandlerFactory-Integrated"/>
            <remove name="ScriptHandlerFactory" />
            <remove name="ScriptHandlerFactoryAppServices" />
            <remove name="ScriptResource" />
            <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>
        </system.webServer>

        <runtime>
          <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
            <dependentAssembly>
              <assemblyIdentity name="System.Web.Extensions" publicKeyToken="31bf3856ad364e35"/>
              <bindingRedirect oldVersion="1.0.0.0-1.1.0.0" newVersion="3.5.0.0"/>
            </dependentAssembly>
            <dependentAssembly>
              <assemblyIdentity name="System.Web.Extensions.Design" publicKeyToken="31bf3856ad364e35"/>
              <bindingRedirect oldVersion="1.0.0.0-1.1.0.0" newVersion="3.5.0.0"/>
            </dependentAssembly>
          </assemblyBinding>
        </runtime>


    </configuration>
    Plzzzzzzzzzz tell me where i can change ?????

    where <section name="modules" allowDefinition="MachineToApplication" overrideModeDefault="Allow" />

    and Kjz notification?????????????????????????????

    Thank u

    Friday, March 19, 2010 9:57 PM
  • Hi,

    what do u say?I don't understand anything?Is it a poetry?

    thanks

    Friday, April 02, 2010 8:56 AM
  • Hi Tunisien86, In my case i changed the IIS application pool to ASP.NET 2.0 one, it worked. But my background of the error was, i was down converting a .net 4.0 app to 3.5 one. Hope this helps.

     

    Friday, April 02, 2010 1:39 PM
  • In the C:\Windows\System32\inetsrv\config\applicationHost.config  file.
    Wednesday, July 07, 2010 9:07 AM
  • I found the solution.

    Simply change the applicationHost.Config file to this;

    <SECTION allowDefinition="MachineToApplication" overrideModeDefault="Allow" name="modules" />

     

    Then you get a different error, 404.3 Not Found, which I am now looking into.

    It annoys me long, I tried it and it's all right, I have the similar question.
    Monday, October 04, 2010 2:51 AM
  • Where exactly in that file? - either I get an error from IIS saying that there is an error in the file and I cannot use it, or the changes has no effect what so ever.
    Tuesday, November 02, 2010 10:27 AM
  • Check the folder permission for \ASPNET and \IIS_IUSRS
    Wednesday, October 26, 2011 1:54 PM
  •  just removed the web config file in the folder which did not containes a <configuration> tag and it works well
    Saturday, March 31, 2012 3:30 AM