Top "Asp.net-web-api" questions

ASP.

Why should I use IHttpActionResult instead of HttpResponseMessage?

I have been developing with WebApi and have moved on to WebApi2 where Microsoft has introduced a new IHttpActionResult Interface …

c# asp.net-web-api httpresponse
How to use System.Net.HttpClient to post a complex type?

I have a custom complex type that I want to work with using Web API. public class Widget { public int …

c# asp.net-web-api
Multiple actions were found that match the request in Web Api

I keep getting this error when I try to have 2 "Get" methods Multiple actions were found that match the request: …

c# .net asp.net-web-api asp.net-web-api-routing
Error :Request header field Content-Type is not allowed by Access-Control-Allow-Headers

I created an mvc4 web api project using vS2012. I used following tutorial to solve the Cross-Origin Resource Sharing, "http://…

jquery asp.net-mvc-4 asp.net-web-api oauth-2.0 cors
Download file from an ASP.NET Web API method using AngularJS

In my Angular JS project, I've an <a> anchor tag, which when clicked makes an HTTP GET request …

c# javascript html angularjs asp.net-web-api
Failed to serialize the response in Web API with Json

I am working with ASP.NET MVC 5 Web Api. I want consult all my users. I wrote api/users and …

c# asp.net json asp.net-web-api
MVC web api: No 'Access-Control-Allow-Origin' header is present on the requested resource

I tried everything that is written in this article: http://www.asp.net/web-api/overview/security/enabling-cross-origin-requests-in-web-api, but nothing works. …

c# asp.net-mvc angularjs asp.net-web-api cors
ASP.NET Web API - PUT & DELETE Verbs Not Allowed - IIS 8

I recently upgraded from Visual Studio 2010 to the Visual Studio 2012 RC. The installer also installs IIS 8 Express which Visual Studio …

asp.net iis asp.net-web-api iis-8
Make sure that the controller has a parameterless public constructor error

I have followed this tutorial which has worked great, until I modified my DbContext to have an additional constructor. I …

c# asp.net-mvc asp.net-web-api unity-container
web-api POST body object always null

I'm still learning web API, so pardon me if my question sounds stupid. I have this in my StudentController: public …

c# rest asp.net-web-api