ASP.Net的WebAPI领域的支持 [英] ASP.Net WebAPI area support
问题描述
我想一定的WebAPI支持添加到我的asp.net 4 RC的网站,并希望把它变成一个领域。我看到有人设法得到公测这个运行(的此处),但说实话,不知道我在RC正在做的。
I am trying to add some WebAPI support to my asp.net 4 RC site, and wish to put it into an area. I have seen that someone managed to get this running on the beta (here) , but to be honest, have no idea what I am doing in the RC.
有没有人管理,以区支持添加到的WebAPI的RC?
Has anybody managed to add area support to the RC of WebAPI?
推荐答案
您可以把阿比控制器,你喜欢的任何文件夹中,你并不需要像你这样的MVC创建区。我通常做的是建立内部控制器MVC网站的文件夹的子文件夹阿比。只需注册路线您的API控制器,它会正常工作。
You can put Api controllers in any folder you like, you don't need to create an Area like you did for MVC. What I usually do is create a subfolder 'Api' inside 'Controllers' folder of MVC site. Just register routes for your Api controllers and it will work.
这篇关于ASP.Net的WebAPI领域的支持的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!