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

后端 未结 14 2487
孤城傲影
孤城傲影 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:15

    Faced the same problem. Checked all the answers here but my problem was in namespacing. Routing attributes exists in System.Web.Mvc and in System.Web.Http. My usings included Mvc namespace and it was the reason. For webapi u need to use System.Net.Http.

提交回复
热议问题