Friday, October 1, 2010

Configuration Error when running a virtual directory

I encounter this problem today:


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:





Line 72:   </httpHandlers>
Line 73:   <httpModules>
Line 74:    <add name="ScriptModule" type="System.Web.Handlers.ScriptModule, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
Line 75:   </httpModules>
Line 76:  </system.web>


This can happen if there are two HttpModules named "ScriptModule".  This can mysteriously happen if you are running a virtual directory under an asp application that already has the module defined.  You can either remove the HttpModule declaration <add name="ScriptModule" type="System.Web.Handlers.ScriptModule, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/> from the VD web.config, or all a remove node

<remove name="ScriptModule" />
just before adding it back.

No comments:

Post a Comment