Wednesday 24 July 2013

Could not load type 'System.Web.UI.ScriptReferenceBase' from assembly 'System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'.

Server Error in '/Imagesample1-ModalPopup' Application.

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'.

Source Error:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

Stack Trace:


[TypeLoadException: Could not load type 'System.Web.UI.ScriptReferenceBase' from assembly 'System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'.]
AjaxControlToolkit.ToolkitScriptManager.OnResolveScriptReference(ScriptReferenceEventArgs e) in c:\TeamCity\buildAgent\work\86982cda3515e83b\Server\AjaxControlToolkit\ToolkitScriptManager\ToolkitScriptManager.cs:276
System.Web.UI.ScriptManager.RegisterScripts() +261
System.Web.UI.ScriptManager.OnPagePreRenderComplete(Object sender, EventArgs e) +117
System.Web.UI.Page.OnPreRenderComplete(EventArgs e) +2063008
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +2247



Version Information: Microsoft .NET Framework Version:2.0.50727.1433; ASP.NET Version:2.0.50727.1433 
======================================================

Two Reasons To Cause This Error:

1.Install Framework 3.5 SP1 (Service Pack 1)
http://www.microsoft.com/en-us/download/confirmation.aspx?id=22

2. If you are using Ajax Control Toolkit then use ToolkitScriptManager

<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="cc1" %>

<cc1:ToolkitScriptManager ID="ScriptManager1" runat="server"></cc1:ToolkitScriptManager >

or else use

<asp:ScriptManager ID="ScriptManager1" runat="server" > </asp:ScriptManager>

Download Ajax Control Toolkit And Add To Visual Studio ToolBox
http://www.asp.net/ajaxlibrary/act.ashx

No comments:

Post a Comment

Note: only a member of this blog may post a comment.