简体   繁体   English

Sitecore MVC-在执行当前Web请求期间生成了未处理的异常

[英]Sitecore MVC - An unhandled exception was generated during the execution of the current web request

I am getting the below exception and no clue of the class/method name. 我得到下面的异常,没有类/方法名称的线索。 Just it shows me the fully qualified type names. 只是它向我显示了完全限定的类型名称。 But which dictionary? 但是哪本字典? I debugged and couldn't find out the exact place as at one point, straightaway it throws this exception. 我调试了一下,却找不到确切的位置,直接抛出了此异常。 Its a MVC application (Sitecore MVC) 它是一个MVC应用程序(Sitecore MVC)

Any help please? 有什么帮助吗? or clue on how to debug or fix this issue? 或有关如何调试或解决此问题的线索?

Description: An unhandled exception occurred. 说明:发生未处理的异常。

Exception Details: System.InvalidOperationException: The model item passed into the dictionary is of type ProductController but this dictionary requires a model item of type ProductViewController 异常详细信息:System.InvalidOperationException:传递到字典中的模型项的类型为ProductController,但是此字典需要类型为ProductViewController的模型项

One of your renderings is trying to pass in the wrong object type from the Controller to the Razor file. 您的渲染图之一试图将错误的对象类型从Controller传递到Razor文件。

Look through the renderings that you have on the page that is generating the exception. 浏览生成异常的页面上的渲染图。 One of the razor scripts will have a model tag something like this: 其中一个剃刀脚本将具有模型标签,如下所示:

@model Namespace.ProductViewController

But the controller action, or view rendering is setup to pass in a ProductController object. 但是控制器动作或视图呈现被设置为传递ProductController对象。 You need to update either the view or the controller action so that the correct model is passed in, or the correct model is expected. 您需要更新视图或控制器操作,以便传递正确的模型或期望正确的模型。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 在执行当前Web请求asp net的过程中生成了未处理的异常 - an unhandled exception was generated during the execution of the current web request asp net 当前Web请求执行期间生成了未处理的异常 - An unhandled exception was generated during the execution of the current web request 在执行当前Web请求期间生成了未处理的异常。[HttpAntiForgeryException] - An unhandled exception was generated during the execution of the current web request.[HttpAntiForgeryException] 获取“在执行当前Web请求期间生成了未处理的异常。” 我的MVC UserManagementController中的错误 - Getting 'An unhandled exception was generated during the execution of the current web request.' Error in my MVC UserManagementController 当前Web请求执行期间发生未处理的异常 - An unhandled exception occurred during the execution of the current web request 当前Web请求“Ненайденуказанныймодуль”的执行期间发生未处理的异常 - An unhandled exception occurred during the execution of the current web request, “Не найден указанный модуль” 当前Web请求的执行期间发生未处理的异常。 型号兼容性无法检查 - An unhandled exception occurred during the execution of the current web request. Model compatibility cannot be checked 执行当前 Web 请求期间发生未处理的异常。 ASP.NET - An unhandled exception occurred during the execution of the current web request. ASP.NET 如何修复“在执行当前 Web 请求期间发生未处理的异常。” - How to fix "An unhandled exception occurred during the execution of the current web request. " WCF未处理的异常在执行当前Web请求期间发生 - WCF unhandled exception occured during the excution of the current web request
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM