首页 文章

ASP.Net Core 1.0无法加载一个或多个请求的类型 . 检索LoaderExceptions属性以获取更多信息

提问于
浏览
2

我正在尝试部署ASP . 带有实体框架的IIS 7.5.7中的Net Core 1.0尝试访问站点时,日志文件中会出现如下错误消息 .

失败:Microsoft.AspNet.Diagnostics.ExceptionHandlerMiddleware [0]发生了未处理的异常:无法加载一个或多个请求的类型 . 检索LoaderExceptions属性以获取更多信息 . System.Reflection.ReflectionTypeLoadException:无法加载一个或多个请求的类型 . 检索LoaderExceptions属性以获取更多信息 . System.Reflection.RuntimeModule.GetTypes(RuntimeModule模块)的System.Reflection.RuntimeAssembly.get_DefinedTypes()at System.Linq.Enumerable.d__16 2.MoveNext() at System.Linq.Enumerable.WhereEnumerableIterator 1.MoveNext()at Microsoft.AspNet.Mvc.ApplicationModels.DefaultApplicationModelProvider.OnProvidersExecuting(ApplicationModelProviderContext) Microsoft.AspNet上的Microsoft.AspNet.Mvc.Controllers.ControllerActionDescriptorProvider.GetDescriptors()Microsoft.AspNet.Mvc.Controllers.ControllerActionDesctionorProvider.OnProvidersExecuting(ActionDescriptorProviderContext context)上的Microsoft.AspNet.Mvc.Controllers.ControllerActionDescriptorProvider.BuildModel() .Mvc.Infrastructure.DefaultActionDescriptorsCollectionProvider.GetCollection()在Microsoft.AspNet.Mvc.Rout上的Microsoft.AspNet.Defrastructure.DefaultActionDescriptorsCollectionProvider.get_ActionDescriptors(),Microsoft.AspNet.Mvc.Routing.AttributeRoute.RouteAsync的Microsoft.AtnetRoute.GetInnerRoute() (RouteContext上下文)在Microsoft.AspNet.Routing.RouteCo上llection.d__9.MoveNext()---抛出异常的前一个位置的堆栈跟踪结束---在System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification的System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(任务任务)中Microsoft.AspNet.Builder.RouterMiddleware.d__4.MoveNext()---来自抛出异常的先前位置的堆栈跟踪结束---在System的System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(任务任务)处 . Microsoft.AspNet.Session.SessionMiddleware.d__8.MoveNext()中的Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(任务任务)---从抛出异常的先前位置开始的堆栈跟踪结束---在Microsoft.AspNet.Session.SessionMiddleware .d__8.MoveNext()---抛出异常的前一个位置的堆栈跟踪结束---在System.Runtime.CompilerServices.TaskAwaiter.HandleNo的System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(任务任务)处Microsoft.ApplicationInsights.AspNet.ExceptionTrackingMiddleware.d__4.MoveNext()中的nSuccessAndDebuggerNotification(任务任务)---从抛出异常的先前位置开始的堆栈跟踪结束---在System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(任务任务)在Microsoft.AspNet.IISPlatformHandler.IISPlatformHandlerMiddleware.d__8.MoveNext()中的System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(任务任务)---从抛出异常的上一个位置的堆栈跟踪结束---在System.Runtime . Microsoft.AspNet.Diagnostics.ExceptionHandlerMiddleware.d__6.MoveNext()上的System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(任务任务)中的CompilerServices.TaskAwaiter.ThrowForNonSuccess(任务任务)

页面显示如

该网站无法显示HTTP 500页面
最有可能的原因:•网站正在维护中 . •网站存在编程错误 .

我试过这个链接进行部署http://www.strathweb.com/2015/12/running-asp-net-5-website-on-iis/

如何找到无法加载的dll?

1 回答

  • 0

    我找到了解决问题的方法 .

    转到Project.json,然后检查文件中的所有引用 . 如果在没有“x.x.x-rc1-final”(x =任何版本号)的情况下找到任何引用,请删除该引用或使用rc1-final添加支持的版本

    这将解决问题 .

    谢谢

相关问题