Multiple Controllers with one Name in ASP.NET MVC 2

后端 未结 6 1002
情深已故
情深已故 2021-01-11 14:40

I receive the following error when trying to run my ASP.NET MVC application:

The request for \'Account\' has found the following matching controllers:

6条回答
  •  北恋
    北恋 (楼主)
    2021-01-11 15:23

    You can't have more than one controller named Account in your application, even in different namespaces.

    You have to have these controllers split up by Area (a feature in ASP.NET MVC 2).

    If you conduct a Find for AccountController you'll find all controllers named Account in your application; and move them off into different Areas if you want both of them, or delete one.

提交回复
热议问题