Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: IIS6 IIS7 VB ASP ASP.NET VBScript , +
How do I work my way around this catch-22? Any suggestions? I've spent a good deal of time Googling for any possible workarounds and some of what I've done is a result of that, but I am still stuck.
 
See the tags list for this post for my environment. I am testing with IIS7 on Win7 with VS2010 and ASP.NET 4/VB.NET but Classic ASP/VBScript as well.
Basically, I have a main 'mysite.com' and it's a Classic ASP Web Application and at the root.
 
In a directory '/NAAC/purchase' I have a sub-application using ASP.NET 4/VB.NET developed with VS2010 and using AJAX.
 
I'm in a bit of a bind. I had to comment out the whole <configSections> element of my web.config (of the root - Classic ASP - website) file in order to get the sites to play nice with each other, but then AJAX stops working because the stuff in the commented out section is necessary for AJAX.
 
With the stuff commented out, I get "Microsoft JScript runtime error: ASP.NET Ajax client-side framework failed to load." But the index.aspx page of my sub-website loads fine otherwise. Now, let's say I remove the web.config comments and I have:
 
 
<configuration xmlns="http://schemas.microsoft.com/.NetConfiguration/v2.0">
    &lt;!-- Register a new config section--&gt;
    <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>
	proprietary stuff here...
    </appsettings>
    &lt;!-- Connection string, currently configured for SQL Express--&gt;
    <system.web>
        <compilation debug="true" targetframework="4.0">
            <assemblies>
                <add assembly="System.Design, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A" />
                <add assembly="System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089" />
                <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.Xml.Linq, Version=3.5.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089" />
                <add assembly="System.Data.DataSetExtensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089" />
            </assemblies>
        </compilation>
        <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" validate="false" type="System.Web.Handlers.ScriptResourceHandler, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
        </httphandlers>
        <httpmodules>
            &lt;!--<remove name="UrlRewriter" />--&gt;
            <add name="ScriptModule" type="System.Web.Handlers.ScriptModule, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
        </httpmodules>
        <identity impersonate="false" />
        <authentication mode="Windows" />
    </system.web>
    <system.codedom>
        <compilers>
            <compiler language="c#;cs;csharp" extension=".cs" type="Microsoft.CSharp.CSharpCodeProvider,System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" warninglevel="4">
                <provideroption name="CompilerVersion" value="v4.0" />
                <provideroption name="WarnAsError" value="false" />
            </compiler>
            <compiler language="vb;vbs;visualbasic;vbscript" extension=".vb" type="Microsoft.VisualBasic.VBCodeProvider, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" warninglevel="4">
                <provideroption name="CompilerVersion" value="v4.0" />
                <provideroption name="OptionInfer" value="true" />
                <provideroption name="WarnAsError" value="false" />
            </compiler>
        </compilers>
    </system.codedom>
    <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="PageHandlerFactory-ISAPI-4.0" path="*.aspx" verb="*" modules="IsapiModule" scriptprocessor="C:\Windows\Microsoft.NET\Framework\v4.0.30319\aspnet_isapi.dll" resourcetype="Unspecified" precondition="classicMode,runtimeVersionv4.0,bitness32" />
            <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" verb="GET,HEAD" path="ScriptResource.axd" precondition="integratedMode" 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>
 
But now I get "HTTP Error 500.19 - Internal Server Error. The requested page cannot be accessed because the related configuration data for the page is invalid. There is a duplicate 'system.web.extensions/scripting/scriptResourceHandler' section defined."
 
You see, I commented out the <configSections> element in my Web.config in order to work around this error, but then AJAX won't work even though the rest of the page displays.
 
How do I work my way around this catch-22? I'd be grateful for any suggestions!
Posted 11-Aug-11 7:49am
Edited 11-Aug-11 11:49am
v4

1 solution

Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

Try this Fix link dude(Let me know if still any error)
Duplicate Config Section in web.config[^]
  Permalink  

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
0 OriginalGriff 210
1 Richard MacCutchan 100
2 kbrandwijk 90
3 ChauhanAjay 80
4 ProgramFOX 80
0 Sergey Alexandrovich Kryukov 9,050
1 OriginalGriff 8,151
2 CPallini 2,613
3 Richard MacCutchan 2,221
4 Abhinav S 1,928


Advertise | Privacy | Mobile
Web04 | 2.8.140827.1 | Last Updated 11 Aug 2011
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100