简体   繁体   中英

asp.net Web Forms and Web API

I need to build a web service to handle HTTP Form posts (CRUD) using .Net Web API

Although I am aware that the API can be run under WebForms I have heard that type of thing before (see 'Dynamic Data') and then in the reality encountered the need for functional work-arounds, limitations etc.

Has anyone used Web API for CRUD under Web Forms? Any issues?

Thanks for any insights!

That works just fine. The post at http://blogs.msdn.com/b/henrikn/archive/2012/02/23/using-asp-net-web-api-with-asp-net-web-forms.aspx has a step-by-step guide on how to make that work. As you said in one of your comments, ASP.NET Web API can be used outside of MVC4, and the easiest way to do that is to use NuGet to download the Web API packages only. The post at http://blogs.msdn.com/b/carlosfigueira/archive/2012/07/12/creating-asp-net-web-apis-on-azure-web-sites.aspx does that (it shows Web APIs being used in an empty web application, but the same applies to web forms as well).

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM