« Previous Next »

Thread: ::: Web.Config Compilation error - Overriding the Web.Config file settings :::

Last post 03-19-2009 2:23 PM by earthtechconcepts. 4 replies.

Average Rating Rate It (5)

RSS

Page 1 of 1 (5 items)

Sort Posts:

  • 03-02-2009, 7:24 AM

    ::: Web.Config Compilation error - Overriding the Web.Config file settings :::

    Hello Everyone,

    Thanks in advance,

    Here i had some problem with my web.config file in the root of the website on the production server.

    I created one website for my application assume "MySite". Under this i had some other applications assume like "MySubSite1" and "MySubSite2".

    When i access MySite its working fine. But when i access MySubSite1 or MySubSite2 it is giving some web.config compilation errors. Here the problem is it is taking the values from root web.config. Here i am pasting the error even....


    Server Error in '/Test/Test4' Application.

    Configuration Error

    Description: An error occurred during the processing of a configuration file required to service this request. Please review the specific error details below and modify your configuration file appropriately.

    Parser Error Message: Unrecognized attribute 'type'.

    Source Error:

    Line 3:  	<configSections>
    Line 4: <section name="log4net" type="log4net.Config.Log4NetConfigurationSectionHandler, log4net"/>
    Line 5: <sectionGroup name="system.web.extensions" type="System.Web.Configuration.SystemWebExtensionsSectionGroup, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35">
    Line 6: <sectionGroup name="scripting" type="System.Web.Configuration.ScriptingSectionGroup, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35">
    Line 7: <section name="scriptResourceHandler" type="System.Web.Configuration.ScriptingScriptResourceHandlerSection, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" requirePermission="false" allowDefinition="MachineToApplication"/>

    Source File: D:\WWPublic\web.config    Line: 5


    Version Information: Microsoft .NET Framework Version:1.1.4322.2032; ASP.NET Version:1.1.4322.2032




    Here my question is how to override these configuration settings in MySubSite web.config file. Please it is very urgent...

    Thanks and Regards,
    Chary...

     

  • 03-06-2009, 3:30 AM In reply to

    Re: ::: Web.Config Compilation error - Overriding the Web.Config file settings :::

    Hi,

    You can remove  predefined section or section group by using <remove> element in the sub sites' web config file. It looks like this:

    <configuration>
       <configSections>
          <remove name="system.web.extensions "/>
         <!--
             Add your new section or section group
          --> 
      </configSections>
    </configuration>

    For more information, please refer to:
    <remove> Element for <configSections>
    http://msdn.microsoft.com/en-us/library/aa309404(VS.71).aspx

    Additionally, you can get more valuable suggestions at ASP.net Forum(the same log in here).

    Leo Tang
    Microsoft Online Community Support

    Please remember to mark the replies as answers if they help and unmark them if they provide no help.
  • 03-06-2009, 6:58 AM In reply to

    • tomkmvp
    • Top 10 Contributor
    • Joined on 03-20-2003, 10:27 AM
    • Central NJ
    • Posts 6,235
    • IIS MVPs

    Re: ::: Web.Config Compilation error - Overriding the Web.Config file settings :::

    I see this is running as ASP.NET 1.1 ... is the root set to ASP.NET 2.0?

  • 03-19-2009, 1:20 PM In reply to

    Re: ::: Web.Config Compilation error - Overriding the Web.Config file settings :::

    Hi,

    i am really feeling dopey now - i am having a similar issue - i have a silverlight "shell" application with mostly asp.net stuff - when i run and test via Visual Studio Web Developer i have no problems, but when i publish to my site, i get the exact error as noted in the first note here.

    many thanks in advance :o)

     cathy

  • 03-19-2009, 2:23 PM In reply to

    Re: ::: Web.Config Compilation error - Overriding the Web.Config file settings :::

    oops - problem solved - my iis default page was not set to asp.net version 2.0 - problem solved after setting it in the properties for the website.
Page 1 of 1 (5 items)
Microsoft Communities