locked
The configuration section 'system.web.extensions' cannot be read because it is missing a section declaration RRS feed

  • Question

  • User-1246604461 posted

    My system: I have installed Windows 7, VS2010 and .NET40 and ASPAJAXExtSetup.msi

    I'm getting the error below.

    <fieldset><legend>Error Summary</legend> </fieldset><fieldset>

    HTTP Error 500.19 - Internal Server Error

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

    </fieldset>
    <fieldset><legend>Detailed Error Information</legend>
    Module IIS Web Core
    Notification Unknown
    Handler Not yet determined
    Error Code 0x80070032
    Config Error The configuration section 'system.web.extensions' cannot be read because it is missing a section declaration
    Config File \\?\C:\inetpub\tickets\web.config
    Requested URL http://www.tickets.com:80/
    Physical Path
    Logon Method Not yet determined
    Logon User Not yet determined
    </fieldset>
    <fieldset> <legend>Config Source</legend>
       45: 	</connectionStrings>
    46: <system.web.extensions>
    47: <scripting>
    </fieldset>

    My web.config:


    <?xml version="1.0"?>
    <configuration>
        <connectionStrings>        
        </connectionStrings>
        <system.web.extensions>
            <scripting>
                <webServices>
                    <!--http://weblogs.asp.net/andrewfrederick/archive/2008/02/18/a-client-side-ajax-login-for-asp-net.aspx-->
                    <authenticationService enabled="true" requireSSL="false"/>
                </webServices>
            </scripting>
        </system.web.extensions>
        <system.web>
            <httpHandlers>
                <add path="ChartImg.axd" verb="GET,HEAD" type="System.Web.UI.DataVisualization.Charting.ChartHttpHandler, System.Web.DataVisualization, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" validate="false"/>
            </httpHandlers>
            <compilation debug="true" strict="false" explicit="true" targetFramework="4.0">
                <assemblies>
                    <add assembly="System.Design, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/>
                    <add assembly="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
                    <add assembly="System.Web.Extensions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
                    <add assembly="System.Web.Extensions.Design, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/></assemblies></compilation>
            <pages controlRenderingCompatibilityVersion="3.5" clientIDMode="AutoID">
                <namespaces>
                    <clear/>
                    <add namespace="System"/>
                    <add namespace="System.Collections"/>
                    <add namespace="System.Collections.Specialized"/>
                    <add namespace="System.Configuration"/>
                    <add namespace="System.Text"/>
                    <add namespace="System.Text.RegularExpressions"/>
                    <add namespace="System.Web"/>
                    <add namespace="System.Web.Caching"/>
                    <add namespace="System.Web.SessionState"/>
                    <add namespace="System.Web.Security"/>
                    <add namespace="System.Web.Profile"/>
                    <add namespace="System.Web.UI"/>
                    <add namespace="System.Web.UI.WebControls"/>
                    <add namespace="System.Web.UI.WebControls.WebParts"/>
                    <add namespace="System.Web.UI.HtmlControls"/>
                </namespaces>
                <controls>
                    <add tagPrefix="asp" namespace="System.Web.UI.DataVisualization.Charting" assembly="System.Web.DataVisualization, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
                </controls>
            </pages>
            <sessionState mode="InProc" timeout="60"/>
            <authentication mode="Forms">
                <forms name=".MyCookie" slidingExpiration="true" timeout="60" cookieless="AutoDetect" loginUrl="/login/" protection="All" defaultUrl="/">
                    <credentials passwordFormat="SHA1"/>
                </forms>
            </authentication>
            <customErrors mode="Off" defaultRedirect="/contact.aspx">
                <error statusCode="404" redirect="/contact.aspx"/>
            </customErrors>
            <roleManager domain="192.168.0.103" enabled="true" cacheRolesInCookie="true" cookieName=".ASPXROLES" cookieTimeout="60" cookiePath="/" cookieRequireSSL="false" cookieSlidingExpiration="true" cookieProtection="All" defaultProvider="AccessRoleProvider" createPersistentCookie="false" maxCachedResults="25">
                <providers>
                    <clear/>
                    <add name="AccessRoleProvider" connectionStringName="conn1" applicationName="/tickets" type="Samples.AccessProviders.AccessRoleProvider"/>
                </providers>
            </roleManager>
            <membership defaultProvider="AccessMembershipProvider" userIsOnlineTimeWindow="30">
                <providers>
                    <clear/>
                    <add name="AccessMembershipProvider" type="Samples.AccessProviders.AccessMembershipProvider" connectionStringName="conn1" requiresQuestionAndAnswer="false" applicationName="/tickets" minRequiredPasswordLength="6" enablePasswordRetrieval="false" enablePasswordReset="true" requiresUniqueEmail="true" minRequiredNonalphanumericCharacters="0" passwordFormat="Hashed"/>
                </providers>
            </membership>
        </system.web>

        <system.webServer>
            <validation validateIntegratedModeConfiguration="false"/>
            <modules runAllManagedModulesForAllRequests="true">
            </modules>
            <handlers>
                <add name="ChartImageHandler" preCondition="integratedMode" verb="GET,HEAD" path="ChartImg.axd" type="System.Web.UI.DataVisualization.Charting.ChartHttpHandler, System.Web.DataVisualization, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
            </handlers>
            <rewrite>
                <rules>
                    <rule name="ordermanagement">
                        <match url="^eventmanager/ordermanagement/([0-9]+)"/>
                        <action type="Rewrite" url="ordermanagement.aspx?eventid={R:1}"/>
                    </rule>
                </rules>
            </rewrite>
        </system.webServer>
    </configuration>



    Wednesday, April 14, 2010 11:04 AM

All replies

  • User-1704326042 posted

    Hello Peter,

    Try this link : http://mvolo.com/blogs/serverside/archive/2007/12/08/IIS-7.0-Breaking-Changes-ASP.NET-2.0-applications-Integrated-mode.aspx

    It has a list of all possible errors (500 ones) when you start using IIS 7.0

    I used this post to solve a similar error myself.


    Regards,

    Dinia

    http://oudinia.blogspot.com

    http://oudinia.wordpress.com 

    Wednesday, April 14, 2010 11:41 AM
  • User-1246604461 posted

    Hi, thanks, but I dont see any error similar to mine.
    So, still struggling here...:s


    Wednesday, April 14, 2010 12:05 PM
  • User-1704326042 posted

    Hello Smith,


    Please do a Ctrl+F on the webpage, for 500.19


    here's the text

    3)    You receive a configuration error when your application configuration includes an encrypted <identity> section.

    You will receive a 500 – Internal Server Error.  This is HTTP Error 500.19: The requested page cannot be accessed because the related configuration data for the page is invalid.  
    The detailed error information indicates that “Configuration section encryption is not supported”.

    It occurs because IIS attempts to validate the <identity> section and fails to read section-level encryption.


    Workaround:

    1) If your application does not have the problem with request impersonation per breaking change #2, migrate your application configuration by using AppCmd as described in breaking change #1:

    %windir%\system32\inetsrv\Appcmd migrate config "<ApplicationPath>"

    This will insure that the rest of application configuration is migrated, and automatically add the following to your application’s web.config to ignore the <identity> section:

    <system.webServer>

        <validation validateIntegratedModeConfiguration="false" />

    </system.webServer>


    2) If your application does have the problem with request impersonation, move to classic mode.


    I personnally used the first option, and it worked.


    Regards,

    Thursday, April 15, 2010 3:48 AM
  • User-1246604461 posted

    Ok, Im trying this now:
    %windir%\system32\inetsrv\Appcmd migrate config "c:\inetpub\tickets"

    But I get the error:
    ERROR ( message:Cannot find APP object with identifier "c:\inetpub\tickets"". )

    What am I doing wrong?

    Thursday, April 15, 2010 11:12 AM
  • User-1246604461 posted

    I have now done this:
    "appcmd list sites"

    I then see this:
    SITE "Tickets" (id:1,bindings:http/*:80:www.tickets.com,state:Started)

    Next I do:
    appcmd migrate config "Tickets"

    I then get:
    ERROR ( message:Cannot find APP object with identifier "Tickets". )

    What am I doing wrong?

    Friday, April 16, 2010 6:47 AM
  • User1490168606 posted

    I have the same problem, did anyone solve it?

    Thursday, April 22, 2010 1:41 PM
  • User-1246604461 posted

    Try this:

    reinstall asp.net by running "Aspnet_regiis.exe -i" in the c:\windows\microsoft.net\Framework64\v4.0.30319 folder

    Thursday, April 22, 2010 1:48 PM
  • User1490168606 posted

    Thank you. Are you saying that this feature is just available in version 4 only? I'm using version .NET version 3.5.

    Friday, April 23, 2010 5:37 AM
  • User-1246604461 posted

    Should work in 3.5 as well...just give it a shot :)
    If its not that, I dont know it either.

    Friday, April 23, 2010 6:10 AM
  • User1490168606 posted

    Sorry that does not help! 

    Friday, April 23, 2010 11:40 AM
  • User2088759738 posted

    The clue is:

    \\?\C:\inetpub\tickets\web.config

    That's not a proper path. I've started to have the same problem myself. It started happening when I double-clicked "Default Document" for my sub-folder application.

    So the question is, why is it referring to \\?\C:\..., when it should be C:\... and how do we turn it back?

    [EDIT]

    Sorry that wasn't it. I did have an error in my web.config file, which when fixed worked fine.

    I had commented out the '<compilation debug="true">' tag with <!-- -->

    So instead I declared it with false and it worked. 

    Tuesday, May 11, 2010 11:07 PM
  • User-1328843247 posted

    I was seeing a similar problem.

    I went into my Application Pool and changed the .NET Framework Version from v2.0 to v4.0 and the problem is fixed.

    I would assume that the "<system.web.extensions/>" section is not supported in v2.0, but I do not want to take to time to answer that question.

    Thursday, September 9, 2010 10:29 AM
  • User1076041960 posted

    This is because config section hasn't declared. in 4.0 webconfig you have to add it manually.

     

    <configSections>

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

    </configSections>

    Hope that helps.

     

     

     

    Monday, October 25, 2010 8:39 AM
  • User-1386829039 posted

    I know I'm late to the party, but I ran into this exact issue.  The answer for me ended up being quite simple:

    Using Peter's example, just add a trailing forward slash after "Tickets."  So "Tickets" becomes "Tickets/"

    appcmd migrate config "Tickets/"

    Hope that helps somebody else stumbling on this thread. :)

    Wednesday, June 8, 2011 10:20 AM