3

When I run my website, I get the following error message

Cannot add duplicate collection entry of type 'add' with unique key attribute 'name' set to 'Telerik_Web_UI_WebResource_axd'

Here are the contents of web.config...

    <httpHandlers>
      <add path="Telerik.Web.UI.WebResource.axd" type="Telerik.Web.UI.WebResource" verb="*" validate="false"/>
    </httpHandlers>


  <system.webServer>
    <modules runAllManagedModulesForAllRequests="true"/>
    <validation validateIntegratedModeConfiguration="false"/>
    <handlers>
      <add name="Telerik_Web_UI_WebResource_axd" verb="*" preCondition="integratedMode" path="Telerik.Web.UI.WebResource.axd" type="Telerik.Web.UI.WebResource"/>
    </handlers>
  </system.webServer>

If I comment out the handlers entry.. I get the following error message...

'~/Telerik.Web.UI.WebResource.axd' is missing in web.config. RadScriptManager requires a HttpHandler registration in web.config. Please, use the control Smart Tag to add the handler automatically, or see the help for more information: Controls > RadScriptManager

I am total at loss on how to fix this. I do not know how to use Smart Tag. I have googled, looked into SO, looked into Telerik site and can not find solution any where. I do not know if the problem is in my web.config, Virtual directory or where??? My colleagues have the same code base and web.config and it works for them.

EDIT Here is my development machine setup...

Windows 7 Enterprise Service Pack 1 64 bit OS

Visual Studio 2010 Enterprise Service pack 1 IIS version 7.5

Please help.

4
  • What web server ? IIS 7 or IIS 6, or maybe VS.NET development server Commented Jun 4, 2012 at 23:47
  • just answered your question in EDIT Commented Jun 5, 2012 at 0:00
  • look in system32\inetsrv\config\applicationHost.config and \Windows\Microsoft.NET\Framework\v4.0.30319\Config\machine.config is there something in system.webServer handlers section related to Telerik Commented Jun 5, 2012 at 0:08
  • both files do not have any mention of Telerik Commented Jun 5, 2012 at 0:24

1 Answer 1

2

The problem wont be in the IIS config; as the error message specifically refers to a Web.config file, so that's going to be in .Net

What happens if you comment out the httpHandlers entry rather then handlers ?

Edit: After looking at your web.config file, the only thing I can suggest is changing the format of the system.webServer.handlers.add part from

<add name="Telerik_Web_UI_WebResource_axd" verb="*" preCondition="integratedMode" path="Telerik.Web.UI.WebResource.axd" type="Telerik.Web.UI.WebResource"/>

to:

<add name="Telerik.Web.UI.WebResource"  path="Telerik.Web.UI.WebResource.axd" verb="*" type="Telerik.Web.UI.WebResource, Telerik.Web.UI" />

And that's because that's what Telerik suggest to be the best practice; If that doesn't work then I'm sorry but I'm out of ideas tonight, but please leave the question open, perhaps someone with a better idea will see it in the morning.

Sign up to request clarification or add additional context in comments.

13 Comments

Just occured to me, make sure the web.config file you're looking at isn't the only one in the solution; .Net lets you have multiple config files at different directory levels.
when I comment out httpHandlers entry.. I get the error : Cannot add duplicate collection entry of type 'add' with unique key attribute 'name' set to 'Telerik_Web_UI_WebResource_axd'
Have you checked to see if you have multiple config files ?
I have web.config, web.debug.config, and web.release.config
If your web.config doesn't have anything confidential in it like a password or anything, you might consider posting it here: shorttext.com and using the private option; then you can put the link into a comment here and I can have a look for you ?
|

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.