While deploying my application on a production server, I was facing the following issue:
Exception: System.TypeLoadException
Message: Could not load type 'System.Web.UI.ScriptReferenceBase' from assembly
'System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'.
Stack Trace: at AjaxControlToolkit.ToolkitScriptManager.OnResolveScriptReference
(ScriptReferenceEventArgs e)
By looking into above details, it clearly shows that there is some problem in loading AjaxControlToolkit assembly.
I did some online search for issue and verified all possible things on production server:
Exception: System.TypeLoadException
Message: Could not load type 'System.Web.UI.ScriptReferenceBase' from assembly
'System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'.
Stack Trace: at AjaxControlToolkit.ToolkitScriptManager.OnResolveScriptReference
(ScriptReferenceEventArgs e)
By looking into above details, it clearly shows that there is some problem in loading AjaxControlToolkit assembly.
I did some online search for issue and verified all possible things on production server:
- Verify the correct version of AjaxControlToolkit dll on server.
- Verify the assembly entry in <assemblies> section in configuration file on server with correct version.
But finally find out the missing thing on production server. Production server was missing
ServicePack 1 for .NET 3.5. Because my local machine has .NET 3.5 SP1 where the release is build.
Although It took sometime to convince my System Admin for installing Service Pack 1 for .NET 3.5 on production machine :-).
So, In order the fix the above issue, verify the above mentioned items and install .NET 3.5 Service Pack 1.
Other Web Development Articles: