Could not load type System.Web.UI.ScriptReferenceBase

| October 20, 2010 | 0 Comments

Problem

I was developing small web application by using ModalPopupExtender control of AjaxControlToolkit.Binary.NET 3.5 downloaded from AjaxControlToolKit. After registering AjaxControlToolKit when I used ToolKitScriptManager I got error as:

Could not load type System.Web.UI.ScriptReferenceBase from assembly ‘System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35′.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.Exception Details: System.TypeLoadException: Could not load type ‘System.Web.UI.ScriptReferenceBase’ from assembly ‘System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35′.

Solution

By googling I found number of suggestions. So I think to place them together as reference for others too. Here are some of them:

  1. Install .Net 3.5 SP1  – By default with VS 2008 .Net 3.5 gets install. So check your system (server)  if it is having .Net 3.5 SP1 installed or not. And if not install it  from Microsoft Downloads. I solved my above problem this way.
  2. Change ToolkitScriptmanager to regular Scriptmanager.
  3. Rolled back to version 3.0.20229 from 3.0.20820 of the AJAX Control Toolkit.
  4. If you are hosting your application on remote server & you are getting above mentioned problem. Then  remote server is not having .Net 3.5 SP1 installed. Ask your service provider for that.

Tags:

Category: Error and Solution

Leave a Reply

%d bloggers like this: