What is wrong with my area routing in my bin deployed MVC4 app?

后端 未结 5 1885
我在风中等你
我在风中等你 2021-01-13 04:36

I have just deployed an MVC4 .NET 4.0 app to my web host, for \'live\' deployed testing. Non -area routes are working fine, e.g. my

@Html.ActionLink(\"Regis         


        
5条回答
  •  南笙
    南笙 (楼主)
    2021-01-13 05:07

    Try checking this.ControllerContext.RouteData.DataTokens["area"] in your area's action methods.

    I've had a situation with similar issue in which the area name was simply an empty string.

    Setting the DataToken in the action method might provide you a quick fix but it doesn't answer the question why MVC doesn't set the area name.

提交回复
热议问题