Error: Ambiguous Server Tag

Sometimes I run into this error when using ASP.NET:

“The server tag ‘asp:ScriptManager’ is ambiguous. Please modify the associated registration that is causing ambiguity and pick a new tag prefix.”

Usually, this occurs because I am having a conflict between different versions of System.Web.Extensions.

For example, in my web.config I have the reference to the 3.5 version:

<add tagPrefix=asp namespace=System.Web.UI assembly=System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35/>

But in my .aspx page I have a reference to the 1.0 version:

<%@ Register Assembly=”System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35″ Namespace=”System.Web.UI” TagPrefix=”asp” %>

Solution: Remove “Register Assembly” from .aspx and the asp tagPrefix should now use the web.config version and correctly reference, in this case, AJAX 3.5.