"HTTP Error 500.19 - Internal Server Error" with Dynamic Data

0

I have a simple Dynamic Data application set up using forms authentication as the admin section of another web application. This works when I run it inside Visual Studio as a standalone project.

I've deployed it to my live site inside an application directory and I get the following error:

HTTP Error 500.19 - Internal Server Error The requested page cannot be accessed because the related configuration data for the page is invalid.

  • Module IIS Web Core
  • Notification BeginRequest
  • Handler Not yet determined
  • Error Code 0x800700b7
  • Config Error Cannot add duplicate collection entry of type 'add' with unique key attribute 'name' set to 'UrlRoutingHandler'
  • Config File \?\C:\sites\website1\dd\web.config

Config source:

<add name="ScriptResource" preCondition="integratedMode" verb="GET,HEAD" path="ScriptResource.axd" type="System.Web.Handlers.ScriptResourceHandler, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
<add name="UrlRoutingHandler" preCondition="integratedMode" verb="*" path="UrlRouting.axd" type="System.Web.HttpForbiddenHandler, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"/>
</handlers>

I found a suggested fix for this to change the following values from 'deny' to 'allow' applicationHost.config:

<section name="handlers" overrideModeDefault="Allow" />
<section name="modules" allowDefinition="MachineToApplication" overrideModeDefault="Allow" />

But, this didn't work. Does anyone have any other suggestions, or know what is causing this error.

Thanks.

iis-7
configuration
500-error
asked on Server Fault Nov 22, 2009 by Richard • edited Nov 23, 2009 by Richard

1 Answer

1

That errors means that you have a duplicate setting for UrlRoutingHandler. It's probably set in C:\sites\website1\ or applicationHost.config. You should be able to delete that line from the web.config file for \dd\web.config and you'll be set. To find the root cause, check the other config files in the tree (site level, applicationHost.config in this case) for UrlRoutingHandler.

answered on Server Fault Nov 25, 2009 by Scott Forsyth - MVP

User contributions licensed under CC BY-SA 3.0