本文介绍了无法加载一个或多个请求的类型。检索LoaderExceptions属性以获取更多信息的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述 29岁程序员,3月因学历无情被辞!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: 253Stack 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 我是faci这个问题只有当我在服务器上传,否则在本地机器上它工作正常 plzz帮我解决.. Thanx in advanceI am facing this problem only when i am uploading it on server otherwise on local machine it works fineplzz help me out..Thanx in advance推荐答案<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<system.web> <trust level="Full" /><pre lang="c#">使用System.IO; 使用System.Reflection; 使用System.Text; 尝试 { //导致错误的代码在这里。 } catch(ReflectionTypeLoadException ex) { StringBuilder sb = new StringBuilder(); foreach(ex.LoaderExceptions中的异常exSub) { sb。 AppendLine(exSub.Message); FileNotFoundException exFileNotFound = exSub as FileNotFoundException; if(exFileNotFound!= null) { if(!string.IsNullOrEmpt y(exFileNotFound.FusionLog)) { sb.AppendLine(Fusion Log:); sb.AppendLine(exFileNotFound.FusionLog ); } } sb.AppendLine(); } string errorMessage = sb.ToString(); //根据您的应用程序显示或记录错误。 } 参考资料 msdn,堆栈溢出。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.}Referencesmsdn, stack overflow. 这篇关于无法加载一个或多个请求的类型。检索LoaderExceptions属性以获取更多信息的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持! 上岸,阿里云!
08-23 20:09