SQL Server 2005 Reporting Services: The type 'System.Web.UI.ScriptManager' is ambiguous.

The type 'System.Web.UI.ScriptManager' is ambiguous

If you are trying to run SSRS2005 (or any version really) and you get the following error...

The type 'System.Web.UI.ScriptManager' is ambiguous: it could come from assembly 'C:\WINDOWS\assembly\GAC_MSIL\System.Web.Extensions\1.0.61025.0__31bf3856ad364e35\System.Web.Extensions.dll' or from assembly 'C:\WINDOWS\assembly\GAC_MSIL\System.Web.Extensions\3.5.0.0__31bf3856ad364e35\System.Web.Extensions.dll'. Please specify the assembly explicitly in the type name.

It could be because your web.config file is referring to at least two versions of the same DLL and one of them need to be removed.

Most suggested solutions suggest to delete everything in your /bin folder and rebuild your application. That is not necessary and could cause more problems than it's worth. Besides you could have other applications that actually require the older version of the DLL, which was the case with me.

Your application needs to determine which of the two DLL versions you're going to use and if for some reason you've added both versions into your Assembly, you'll need to remove one of them to cater for that one application. The other application(s) that use the older version - leave them alone.

So in web.config find the following lines (assuming you only need .Net 3.5 and not the .Net 1.1 version) ...

<add assembly="System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
<add assembly="System.Web.Extensions.Design, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>


Just comment out or delete those two lines of configuration.

Done!

Comments