StructureMap MVC 5 html.Action Issue

前端 未结 1 749
生来不讨喜
生来不讨喜 2021-01-13 10:53

I am trying to call an Action from my view using @Html.Action(\"ActionName\",\"controllerName\"). But my page fails to load with below error:

相关标签:
1条回答
  • 2021-01-13 11:43

    You need to add

    x.For<{Your controller name}>().AlwaysUnique();

    in IoC.cs file. This should be done for every controller in your project.

    For more details check this link.

    0 讨论(0)
提交回复
热议问题