by Nathan
17. February 2009 17:14
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 also came upon this problem when trying to fix this issue:
Unable to cast object of type 'System.Web.Configuration.ScriptingAuthenticationServiceSection' to type 'System.Web.Configuration.ScriptingAuthenticationServiceSection'.
which led me to realise there were .NET 3.5 references in the parent application's 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>