Click here to Skip to main content
14,459,361 members
Rate this:
Please Sign up or sign in to vote.
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
Posted
v2
Comments
   
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 4.1.7.1005. 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 (4.1.7.1005); 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 4.1.7.1005 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.
Rate this:
Please Sign up or sign in to vote.

Solution 2

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


<configsections>
		
			<sectiongroup name="system.web.extensions">
        type="System.Web.Configuration.SystemWebExtensionsSectionGroup, 
      System.Web.Extensions, Version=3.5.0.0, Culture=neutral,  
      PublicKeyToken=31BF3856AD364E35">

      <sectiongroup name="scripting">
        type="System.Web.Configuration.ScriptingSectionGroup, 
        System.Web.Extensions, Version=3.5.0.0, Culture=neutral, 
        PublicKeyToken=31BF3856AD364E35">

        

        <sectiongroup name="webServices">
          type="System.Web.Configuration.ScriptingWebServicesSectionGroup,
          System.Web.Extensions, Version=3.5.0.0, Culture=neutral, 
          PublicKeyToken=31BF3856AD364E35">

          

          
         

          

        </sectiongroup>
      </sectiongroup>
    </sectiongroup>

</configsections>


thank you
   
Rate this:
Please Sign up or sign in to vote.

Solution 5

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

<system.web>

   <trust level="Full" />
   
Rate this:
Please Sign up or sign in to vote.

Solution 7

You may solve this issue by setting the Copy Local attribute of your project's references to true!

Instructions

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;

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



References
msdn, stack overflow.
   
Rate this:
Please Sign up or sign in to vote.

Solution 4

Change the asp:ToolkitScriptManager to

<asp:ScriptManager ID="ScriptManager1" EnablePageMethods="true" runat="server">
</asp:ScriptManager>
   
Comments
Ankita1391 18-Dec-15 4:23am
   
it worked for me!
Rate this:
Please Sign up or sign in to vote.

Solution 3

If it works on your local machine, the issue is that you have not copied the dlls to the server.
   
Comments
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, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100