Server tag "asp:ScriptManager" is ambiguous

I have encountered this error message in the past when I upgrade a few projects to 3.5 but it has been at least 3-4 months and found myself stuck with the same dilemma once again today. This error can be attributed to many things but mainly it comes down to web.config or ambigiouty in the references. Like my previous post, I would like to make another mental note as I know for sure that this won't be the last time that I will be seeing this error nor for anybody who upgrades to 3.5 that uses Ajax functionalities. After searching the web for answers, there was no definite response but after an hour of continuous searching, I was able to put all the information together which leads to the fix.

Here are the things that I tried and since that error message doesn't really dictate as to where the ambigiouty was found, I have to make a few guesses. The 4th bullet pretty much fixed my problem.

  • I first removed references such as deleting them, then rebuild.
  • I have to download the latest version of Ajax Control toolkit 3.5 to match the site version (3.5)
  • One alternative that I have read is to rename the namespace into something different on controls that uses Ajax or AjaxControlToolkit but that would cumbersome if you have a lot of pages that uses Ajax. I found this method to be the least ideal.
  • In the <controls> section of the web.config, commenting out the <add tagPrefix="asp" namespace="Microsoft.Web.UI" assembly="Microsoft.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/> section should do the trick.

10 Comments

  • You need to remove the version 1.0 from web.config and the bin deirectory, make sure that as well no control reference that version.

  • I think this is a simple problem of having duplicate declarations. One in the page and one in the web config. When you switch the compiler drop down in the properties to 3.5, it adds a bunch of code to the web.config, this causes the duplicates. The directives in each page are not longer needed.

  • I am going round and round - can you specify the steps for someone like me. i had a vs2005 .net frm 2.0 web project. we moved to a vendor's software that supported ajax and .net frm 3.5.

    i could not recompile, so i installed vs 2008 with .net frm 3.5. i copied vs2005/.net fr 2.0 proj to a new virtual share and opened it using vs 2008 and migrated the project.

    right now i am getting ambiguous error. everyone on the internet says that they changed the web reference from an old version to a new version. which dll and to what version levels. my web.config file has the best and the latest versions of .net framework dll/.net assemblies.

    any help will be appreciated.

    regards
    ravi.

  • First thing I wonted to say is thousand thanks on the solution. The one that worked for me was to delete the part of code in web.config file :



    which probably had an issue with the part off code on the pages :



  • When I am placing an ScriptManager or UpdatePanel it is giving the following error.

    'ScriptManager' is ambiguous in the namespace 'System.Web.UI'.


    'UpdatePanel' is is ambiguous in the namespace 'System.Web.UI'.

    I tried a log, but didnt get the solution. Any Possible solution will be appreciated

  • The problem can also be fixed by commenting or removing the the registry tag of ajax we extension from your page/control.
    for ex:

  • My problem turned out to be fairly simple. My web.config file on the server was out of date with the file on my dev box. I simply missed it when copying the new files over.

  • Just thank you so much!!!
    It worked replacing 1.0.61025.0 with 3.5.0.0 in all the solution as simple as that.

  • Thanks By removing the it worked

  • This solves the problem, put in web.config, to redirect to the new assembly version.













Comments have been disabled for this content.