Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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=, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
<add name="UrlRoutingHandler" preCondition="integratedMode" verb="*" path="UrlRouting.axd" type="System.Web.HttpForbiddenHandler, System.Web, Version=, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"/>

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.


share|improve this question
up vote 1 down vote accepted

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.

share|improve this answer
Thanks! I deleted the setting in dd's web.config and it worked. Obvious really, but I don't like messing with generated config entries I don't fully understand. Plus, I thought setting up an application folder insulated the applications more from each other. – Richard Nov 26 '09 at 11:28

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.