Data dodania Pytanie
2017-06-03 18:06 REST API - should JSON content be HtmlEncoded? »
We have a setup with angular front-end app and asp.net core web api backend. API responds with json. Question is, should json properties be html encod...
(2) odpowiedzi
2017-05-31 18:05 How to provide extra methods for returning IHttpActionResult? »
I have an ApiController that returns OkNegotiatedContentResult<T> with a resource collection, paginated. Naturally, there will be more methods t...
(1) odpowiedzi
2017-05-31 08:05 Get Origin when request made internally instead of browser »
I am making request from one web API to another. I want that only first API can make request to second API, other should not allowed to do so. I have...
(1) odpowiedzi
2017-05-30 22:05 http get method does not supported when using datetime parameter »
I have Webapi service controller that supports two get method which distincts by parameter Controller public class DailyRecordController : BaseApiCo...
(2) odpowiedzi
2017-05-29 08:05 Returning single object and string from web api controller method »
I am in a situation where i need to return the single object along with string .. I am very new to web api and just could not be able to figure it out...
(2) odpowiedzi
2017-05-28 11:05 Why Web Api (.Net Core) always return JSON ignored the value in ContentType? »
I have 2 web APIs and they have the exactly same code and same references. The first one (called Project A) runs under .net 4.6 and is the old web ...
(1) odpowiedzi
2017-05-26 21:05 Web API not parsing get parameters correctly »
I have the following url http://localhost/api/map/tmc/identify? geometry={x:-112.0469856262207,y:33.3926093953406, spatialReference:{wkid:432...
(1) odpowiedzi
2017-05-20 21:05 multiple post methods in same controller »
I'm trying to create web api with multiple post actions. I have 2 post actions [HttpPost] [ActionName("Search")] public HttpResponseMes...
(3) odpowiedzi
2017-05-20 17:05 Cordova Contact with Database »
Below is my code which consist of Javascript and WebAPI,I am trying to check the local phone contacts with my Database.I am using Cordova Contact AP...
(0) odpowiedzi
2017-05-16 15:05 Web Api 2 OWIN Selfhost handle multiple concurrent requests »
I have a selfhosted web api using OWIN, and I seems to struggle on concurrent connections. When I run a stress test with 50 concurrent get events, the...
(1) odpowiedzi
2017-05-13 09:05 Send multiple response back for a POST API request »
Is there a way to send back a file (.pdf) and JSON data in the body for a POST WebAPI request in .NET ? ...
(2) odpowiedzi
2017-05-12 12:05 Web API 2.0 Exception Handling »
I am using Web API 2.0 to create my own project. My Api contain ability to Add , Get and book product. I Want to handle exception but there is some i...
(2) odpowiedzi
2017-05-05 17:05 How to return Datetime correctly in WEB API from Database »
I have the following entity which has 2 datetimefields.. public class Contactos { public int IdContacto { get; set; } public s...
(3) odpowiedzi
2017-04-25 07:04 REST API Http status code best practices »
We are writing a REST API that's going to be exposed publicly and used by lot of third party developers. I am looking at best practices for http statu...
(3) odpowiedzi
2017-04-21 10:04 How to pass object as parameter in Web Api »
I want to pass object as parameter in my web api GET and POST method. My code is, [HttpGet] [Route("mytest/list/{model}")] public IHttpAc...
(1) odpowiedzi
2017-04-12 19:04 Web API - JsonConverter - Custom Attribute »
We are having a web api project and inorder to convert the date time to date and vice versa, we are using DateTimeconverter extended from JsonConverte...
(1) odpowiedzi
2017-04-10 17:04 Google reCaptcha in Web API 2 c# »
I have an ASP.NET Web API 2 Project. I am trying to read Google Captcha from the form. I tried this Code: public string Post(FoundingRequest mod...
(3) odpowiedzi
2017-04-09 17:04 How to bind JSON response from httpClient.PostAsJsonAsync »
I can httpClient.PostAsJsonAsync(path, content) fine. However, this post returns some JSON with details of the response, eg: {"StatusCode":200,"Acces...
(1) odpowiedzi
2017-04-06 19:04 Custom error handling globally in asp.net web api »
I am using asp.net web api. [Route("api/employee")] [HttpPost] public dynamic GetData(EmployeeModel model) { EmployeeService emp = new Employee...
(0) odpowiedzi
2017-04-02 21:04 Could not load file or assembly 'System.Net.Http, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' »
I'm making a web application using WEB API 2. Previously, my project ran fine without any errors. Errors only came after I had updated my nuget packag...
(1) odpowiedzi
2017-04-01 00:04 web api - posting object returns internal server error 500 »
I have a simple web api that uses a database first ADO SQL server entity, with one table in it that has an auto-incrementing identity column and a nva...
(1) odpowiedzi
2017-03-30 17:03 External Aspnet Web Api Authentication »
I am using https://github.com/EddyVerbruggen/cordova-plugin-googleplus for external authentication in a mobile app. In the response from google I get ...
(0) odpowiedzi
2017-03-21 15:03 Byte array and JSON in [FromBody] »
I am trying pass an object which consists of different data type. I am always getting null value for orderDetails in Web API. However if do this, p...
(1) odpowiedzi
2017-03-17 15:03 How do you store the current user as a property on a web api model »
I am using a web api 2 and creating a message object to save to the database. This message object needs to have the current user stored on it as an ap...
(2) odpowiedzi
2017-03-14 10:03 Web API Request is null in ExecuteAsync method of ApiController »
I am trying to access the Request property in my ApiController-derived class. For some reason, Request is null in ExecuteAsync method. I've seen the ...
(1) odpowiedzi
2017-03-13 14:03 Web API 2 - Communication between controllers »
Have anyone experience with communication between controllers in Web API 2 ?? Let's assume, we are working in web zone. Little example: public class...
(2) odpowiedzi
2017-03-09 19:03 How to add MessageHandler for a specific controller that is using Routing Attributes in ASP.NET WebAPI 2? »
It is possible to add a MessageHandler only for a specific controller that is using Route Attributes? I want to cut the request earlier in the pipeli...
(2) odpowiedzi
2017-03-06 16:03 Cannot reuse an 'ApiController' instance - Unity DI »
I followed this tutorial to use Unity dependency injection in WebAPI. To avoid registering each type seperatly I used this setup _container.Register...
(1) odpowiedzi
2017-02-26 18:02 Return custom XML response from IHttpActionResult »
I have following code in my controller [HttpGet] public IHttpActionResult Get_User_Info(long id) { user u = new user(); ...
(0) odpowiedzi
2017-02-24 16:02 Angular 2 http request is not hitting web api get method with a string parameter overload »
My problem is that the first Get method is called from this http request: http://localhost:56690/api/testelements/?name=aeg wouldn't I expect my this...
(1) odpowiedzi
2017-02-17 16:02 Validating Enums in Web api 2 object parameters »
Suppose you send a class-instance to controller and the class has a property of Enum type. public class CoffeeController : ApiController { [HttpP...
(3) odpowiedzi
2017-02-15 17:02 Web API RPC vs WCF and JSON »
I've been doing some research into which protocol / technology stack to use when creating a web service and I would like to get a clear answer on it w...
(1) odpowiedzi
2017-02-14 08:02 Rewriting api and deserializing objects »
I am trying to migrate an old api to webapi. Problem is that experience is limited so I am here asking this question. The current api accepts a json ...
(1) odpowiedzi
2017-02-12 11:02 Authenticating AD user automatically and manually - WebAPI 2 server and SPA client »
I'm developing an Enterprise/Internet Application with WebAPI 2 RESTful server and SPA web client (Angular2) —So I have two separated projects creat...
(0) odpowiedzi
2017-02-08 20:02 Is NuGet Microsoft.AspNet.WebAPI 5.2.3 a WebAPI 2.2? »
There are some confusion of versions of Web API. Check out this Web API at NuGet, Microsoft ASP.NET Web API 2.2 5.2.3 What? Here is the desc...
(1) odpowiedzi