Top "Asp.net-web-api2" questions

ASP.

No MediaTypeFormatter is available to read an object of type 'Advertisement' in asp.net web api

I have a class that name is Advertisement: public class Advertisement { public string Title { get; set; } public string Desc { get; …

c# asp.net asp.net-web-api2 asp.net-identity
Dot character '.' in MVC Web API 2 for request such as api/people/STAFF.45287

The URL I'm trying to let work is one in the style of: http://somedomain.com/api/people/staff.33311 (just …

c# asp.net-mvc-4 asp.net-web-api asp.net-mvc-routing asp.net-web-api2
Return more info to the client using OAuth Bearer Tokens Generation and Owin in WebApi

I have created a WebApi and a Cordova application. I am using HTTP requests to communicate between the Cordova application …

c# authentication owin asp.net-web-api2 bearer-token
An assembly specified in the application dependencies manifest (...) was not found

I upgraded Microsoft.AspNetCore from 2.0.3 to 2.0.5 and my WebAPI project, although running successfully locally, fails to start in production (IIS). …

asp.net-core .net-core asp.net-web-api2 upgrade nuget-package
ASP.NET Web API generate url using Url.Action

How can I generate the same url but in Web Api ? var url = Url.Action("Action", "Controller", new { product = product.…

c# asp.net-mvc-5 asp.net-web-api2
RoutePrefix vs Route

I understand that RoutePrefix doesn't add a route to the routing table by itself. On your actions you need to …

c# asp.net-web-api asp.net-web-api2 asp.net-web-api-routing attributerouting
Deserializing JToken content to an Object

I want to deserialize JToken content to an object (User). How am I able to do this? Here is my …

c# json salesforce json.net asp.net-web-api2
WebApi 2 POST with single string parameter not working

I have the following controller: public class ValuesController : ApiController { // POST api/values public IHttpActionResult Post(string filterName) { return new JsonResult&…

javascript c# asp.net-web-api asp.net-web-api2
Where to store Bearer Token in MVC from Web API

Scenario I have an ASP.NET Web API that uses the OAuth Password Flow to provide Bearer Tokens to gain …

c# security session asp.net-mvc-5 asp.net-web-api2
How to add custom methods to ASP.NET WebAPI controller?

In ASP.NET MVC WebAPI project by default we have created following controller public class ValuesController : ApiController { // GET api/values …

c# asp.net-mvc asp.net-web-api2