Discussion Forum : asp.net-web-api

ASP.NET Web API - No 'MediaTypeFormatter' is available to read an object of type 'Int32'
I'm not entirely sure whats happened here. I may have messed things up somewhere, but I don't know what. My API contro ... View Detail
 Upvotes: 0   Answers: 0
The remote server returned an error: (415) Unsupported Media Type
I try to upload a text file from WPF RESTful client to ASP .NET MVC WebAPI 2 website. Client code HttpWebRequest reque ... View Detail
 Upvotes: 0   Answers: 0
How to add/update child entities when updating a parent entity in EF
The two entities are one-to-many relationship (built by code first fluent api). public class Parent {  public Parent()  ... View Detail
 Upvotes: 0   Answers: 0
ASP.NET WebApi: how to perform a multipart post with file upload using WebApi HttpClient
I have a WebApi service handling an upload from a simple form, like this one:  <form action=/api/workitems enctype=mult ... View Detail
 Upvotes: 0   Answers: 0
Return HTML from ASP.NET Web API
How to return HTML from ASP.NET MVC Web API controller? I tried the code below but got compile error since Response.Wri ... View Detail
 Upvotes: 0   Answers: 0
Return Json from Generic List in Web API
I build my list like this: public static List<SearchFormula> SearchData(string searchString) {  var searchResults = new ... View Detail
 Upvotes: 0   Answers: 0
Output caching for an ApiController (MVC4 Web API)
I'm trying to cache the output of an ApiController method in Web API. Here's the controller code: public class TestCon ... View Detail
 Upvotes: 0   Answers: 0
Add custom header to all responses in Web API
Simple question, and I am sure it has a simple answer but I can't find it. I am using WebAPI and I would like to send b ... View Detail
 Upvotes: 0   Answers: 0
How do I return NotFound() IHttpActionResult with an error message or exception?
I am returning a NotFound IHttpActionResult, when something is not found in my WebApi GET action. Along with this respon ... View Detail
 Upvotes: 0   Answers: 0
Get response from PostAsJsonAsync
I have this line of code var response = new HttpClient().PostAsJsonAsync(posturi, model).Result;  The Called WebAPI c ... View Detail
 Upvotes: 0   Answers: 0
Web API routing with multiple parameters
I'm trying to work out how to do the routing for the following Web API controller: public class MyController : ApiContr ... View Detail
 Upvotes: 0   Answers: 0
Web API 2: how to return JSON with camelCased property names, on objects and their sub-objects
UPDATE Thanks for all the answers. I am on a new project and it looks like I've finally got to the bottom of this: It l ... View Detail
 Upvotes: 0   Answers: 0
Token Based Authentication in ASP.NET Core
I'm working with ASP.NET Core application. I'm trying to implement Token Based Authentication but can not figure out how ... View Detail
 Upvotes: 0   Answers: 0
Web API 2 POST request simulation in POSTMAN Rest Client
I am using ASP.NET Web API 2 with attribute routing. I have the following PlayerModel. public class PlayerModel {  p ... View Detail
 Upvotes: 0   Answers: 0
Can't get UserManager from OwinContext in apicontroller
I'm following a Microsoft sample to implement email validation with Identity 2.0.0 I'm stuck at this part public Appli ... View Detail
 Upvotes: 0   Answers: 0
ASP.net core return Json with status code
I'm looking for the correct way to return JSON with a HTTP status code in my .net core webapi controller. I use to use i ... View Detail
 Upvotes: 0   Answers: 0
WebAPI POST [FromBody] not binding
I'm posting JSON to a WebAPI controller, but the properties on the model are not being bound. public void Post([FromBod ... View Detail
 Upvotes: 0   Answers: 0
Select All distinct values in a column using LINQ
I created a Web Api in VS 2012. I am trying to get all the value from one column Category, that is all the unique value, ... View Detail
 Upvotes: 0   Answers: 0
Unauthorised webapi call returning login page rather than 401
How do I configure my mvc/webapi project so that a webapi method called from a razor view doesn't return the loginpage w ... View Detail
 Upvotes: 0   Answers: 0
Entity framework self referencing loop detected
I have a strange error. I'm experimenting with a .NET 4.5 Web API, Entity Framework and MS SQL Server. I've already crea ... View Detail
 Upvotes: 0   Answers: 0
Specifying a custom DateTime format when serializing with Json.Net
I am developing an API to expose some data using ASP.NET Web API. In one of the API, the client wants us to expose the ... View Detail
 Upvotes: 0   Answers: 0
Difference between MVC 5 Project and Web Api Project
I am new to ASP.NET MVC and Web API and trying to get the basics. AFAIK, we have project templates in VS 2013, named as ... View Detail
 Upvotes: 0   Answers: 0
Can't find Request.GetOwinContext
I have been searching for an hour trying to figure out why this isn't working. I have a ASP.Net MVC 5 application with ... View Detail
 Upvotes: 0   Answers: 0
Get the IP address of the remote host
In ASP.NET there is a System.Web.HttpRequest class, which contains ServerVariables property which can provide us the IP ... View Detail
 Upvotes: 0   Answers: 0
Self referencing loop detected - Getting back data from WebApi to the browser
I am using Entity Framework and having a problem with getting parent and child data to the browser. Here are my classes: ... View Detail
 Upvotes: 0   Answers: 0

Quick Links

E-Magazines

@

Total Followers
Study Group Created
Study Group Joined
Following Teacher
Following Organization
Blog Articles Added
Questions Asked
Questions Answered
Jobs Posted
Total Members in Group
Questions asked by members
Tasks added in this Group

Please wait..

Ok

Login to Open ESchool OR Create your account    Login   SignUp