0

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!

2
  • Just to clarify, are you asking about MVC 4 Web Api? Commented Jul 12, 2012 at 19:08
  • MVC 4 - Well, I am asking about Web APi which happens to be bundled with MVC4 but is in fact an entirely independent product and will run under WebForms. WCF - I think you need to research WCF vs. Asp.Net WebApi, latter is specifcally targeted at RESTful (i.e. non-SOAP) HTTP-based systems, which is what we need. Commented Jul 12, 2012 at 20:16

1 Answer 1

3

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).

Sign up to request clarification or add additional context in comments.

1 Comment

Thanks for the NuGet link (and the reassurance) guess we'll plunge in!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.