by Nathan
29. March 2009 08:42
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: The entry 'ScriptModule' has already been added.
Source Error:
<add name="ScriptModule" type="System.Web.Handlers.ScriptModule, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
This happens when the config for a virtual directory is already defined in the root web application
There are two ways you can fix this:
<remove name="ScriptModule" />
Alternatively you can stop the the web.config inheritance to the the virtual directory.
by adding this to the parent web.config
<location path="." inheritInChildApplications="false">
<system.web>
...
</system.web>
</location>
I found out that the root application had .NET 3.5 references in the web.config
I tried to remove this using:
<location path="." inheritInChildApplications="false">
<system.web>
...
</system.web>
</location>
the problem actually occured due to the 3.5 reference in the <configSections>