No type was found that matches the controller named 'User'

后端 未结 14 2482
孤城傲影
孤城傲影 2020-12-23 19:49

I\'m trying to navigate to a page which its URL is in the following format: localhost:xxxxx/User/{id}/VerifyEmail?secretKey=xxxxxxxxxxxxxxx

I\'ve added a new route i

14条回答
  •  臣服心动
    2020-12-23 20:01

    In my case I was using Web API and I did not have the public defined for my controller class.

    Things to check for Web API:

    • Controller Class is declares as public
    • Controller Class implements ApiController : ApiController
    • Controller Class name needs to end in Controller
    • Check that your url has the /api/ prefix. eg. 'host:port/api/{controller}/{actionMethod}'

提交回复
热议问题