Click here to Skip to main content
14,933,402 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
Server Error in '/' Application.

Unable to load one or more of the requested types. Retrieve the LoaderExceptions property for more information.

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.Reflection.ReflectionTypeLoadException: Unable to load one or more of the requested types. Retrieve the LoaderExceptions property for more information.

Source Error: 

Line 251:                </center>
Line 252:    </div><br />
Line 253:     <asp:ToolkitScriptManager ID="toolKitScriptManager" runat="server">
Line 254:          </asp:ToolkitScriptManager>
Line 255:           <div>

Source File:asasas.aspx    Line: 253 

Stack Trace: 

[ReflectionTypeLoadException: Unable to load one or more of the requested types. Retrieve the LoaderExceptions property for more information.]
   System.Reflection.RuntimeModule.GetTypes(RuntimeModule module) +0
   System.Reflection.RuntimeModule.GetTypes() +4
   System.Reflection.Assembly.GetTypes() +78
   AjaxControlToolkit.ToolkitScriptManagerConfig..cctor() +74

[TypeInitializationException: The type initializer for 'AjaxControlToolkit.ToolkitScriptManagerConfig' threw an exception.]
   AjaxControlToolkit.ToolkitScriptManagerConfig..ctor(IAjaxControlToolkitCacheProvider cacheProvider) +0
   AjaxControlToolkit.ToolkitScriptManager..ctor() +57
   System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +100
   System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +75

I am facing this problem only when i am uploading it on server otherwise on local machine it works fine
plzz help me out..

Thanx in advance
Have you uploaded correctly? I guess you need to upload the Ajax Toolkit dlls also.
Have you done that?
Member 10202727 30-Oct-13 3:47am
yes i had uploaded it .
its in bin directory.. :(
Okay try this. Clean the Project, then Build again. And after that upload all files and bin again. Then Reset the IIS. See if it solves the problem or not.
Member 10202727 30-Oct-13 3:57am
Okey thanx if it works will let u know soon..
Member 10202727 1-Nov-13 5:09am
hey its not working...
i had rebuild my solution uploaded it again still not working .. :(
eisaba 30-Oct-13 2:06am
Same scenario for me, works fine on local machine, on server it throws the exception. I'm struggling to know why is this issue happening. The only action that i've actually identified that throws the exception is when I do overwrite AjaxControlToolkit.dll, from version 3.5.40412.2 to the latest I also copied the dependencies (AjaxMin.dll, HtmlAgilityPack.dll) from the newest version to bin folder.
Member 10202727 1-Nov-13 5:12am
what shud i do ???
Elb47 4-Nov-13 18:20pm
I have same problem and same scenario: on local machine it works fine. The exception raise on server. I'm migrating from 3.5 to latest version (; I have copied to bin folder ajax controltoolikit and its dependencies and ... I have no ideas on how to solve this problem
Elb47 5-Nov-13 4:36am
I solved the problem removing control toolkit and installing version dated January 2013.
eisaba 27-Nov-13 20:43pm
Does that version implements AjaxFileUpload control? not to be confused with AsyncFileUpload. I'm upgrading ajaxcontroltoolkit just by the AjaxFileUpload control.
thatraja 6-Mar-14 2:26am
Post this as answer to help others in future.

put this code in web.config
and check out your version of an toolkit

			<sectiongroup name="system.web.extensions">
      System.Web.Extensions, Version=, Culture=neutral,  

      <sectiongroup name="scripting">
        System.Web.Extensions, Version=, Culture=neutral, 


        <sectiongroup name="webServices">
          System.Web.Extensions, Version=, Culture=neutral, 






thank you
Add the following line in Web.Config file and it will works in my case coz i had same problem.


   <trust level="Full" />
kingomer 3-Dec-20 3:19am
This Works for me Thanks
You may solve this issue by setting the Copy Local attribute of your project's references to true!


1- In Solution Explorer, click the Show All Files button to display the References node.
2- Open the References node for the project.
3- Right-click a reference in the References list, and click Properties.
The properties associated with that reference appear in a list in the Properties window.
4- Select Copy Local from the left-hand column, and then click the arrow in the right-hand column to change the value to True or False.

You may also use the following code to identify what is missing

<pre lang="c#">
using System.IO;
using System.Reflection;
using System.Text;

//The code that causes the error goes here.
catch (ReflectionTypeLoadException ex)
StringBuilder sb = new StringBuilder();
foreach (Exception exSub in ex.LoaderExceptions)
FileNotFoundException exFileNotFound = exSub as FileNotFoundException;
if (exFileNotFound != null)
sb.AppendLine("Fusion Log:");
string errorMessage = sb.ToString();
//Display or log the error based on your application.

msdn, stack overflow.
Change the asp:ToolkitScriptManager to

<asp:ScriptManager ID="ScriptManager1" EnablePageMethods="true" runat="server">
Ankita1391 18-Dec-15 4:23am
it worked for me!
If it works on your local machine, the issue is that you have not copied the dlls to the server.
Member 10202727 24-Jan-14 1:31am
I had copied still it was not working then i tried this piece of code
then i tried to use this webservice...
Christian Graus 24-Jan-14 3:21am
The error means what it says. The files are not there.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900