Data dodania Pytanie
2017-01-12 00:01 C# WebAPI not serializing dynamic properties correctly »
I am creating a new C# OData4 Web API with a class named Call that has dynamic properties, which OData 4 allows via "Open Types". I believe I've set e...
(2) odpowiedzi
2017-01-11 21:01 POST from Typescript to Web API API, unable to pass a JSON Object »
I am trying to pass a JSON Object from a typescript POST call to a Web API method. Fiddler shows that the object has been converted into JSON and the...
(1) odpowiedzi
2017-01-04 17:01 Ensure that WebAPI2 routes are matched before MVC Routes »
I have a web application which uses both MVC and WebAPI2. I would like for requests to always be matched up with WebAPI2 attribute routes before matc...
(0) odpowiedzi
2017-01-04 10:01 Are WebApi 2 request calls processed in logical threads of execution from stack? »
When ASP.NET Web Api 2 processes requests in asynchronous manner are they considered logical threads of execution? I.e. does setting up CallContext...
(0) odpowiedzi
2016-12-20 15:12 .NET WebApi How to prevent "$ref": "x" output of JSON »
I'm Using Web Api with Entity Framework, I have a controller named as Gift, when client GET's the API I'm getting all Gifts from DB by using entity fr...
(1) odpowiedzi
2016-12-19 21:12 Wrapping IHttpActionResult - Generic solution »
I'd like to wrap IHttpActionResult because I need some extra data to be consumed by the client app. My first approach was to create and return simple...
(2) odpowiedzi
2016-12-12 17:12 Calling GET method that return IHttpActionResult from AJAX? »
AJAX works fine with the GetAll method that returns IQueryable, but with GetOne, it doesn't work and return "undefined" to the browser, here is the G...
(2) odpowiedzi
2016-12-11 19:12 Is EntityFramework supposed to be that slow? »
I'm trying to create a simple API for my client mobile app. I created new empty Web API project and an action but it is extremely slow: [HttpGet, Ro...
(1) odpowiedzi
2016-12-10 20:12 Custom authorization in Web API v2 »
My Web API v2 application uses IdentityServer to authorise API requests by checking for a valid bearer token in the request header. This works fine. H...
(0) odpowiedzi
2016-12-02 21:12 Why do I get an HTTP 400 - Bad Request for an apparently successful request? »
I have an action filter to trace the success/failure of requests to actions/controllers with the filter. It has this method: OnActionExecuted(HttpAct...
(0) odpowiedzi
2016-12-02 08:12 asp.net webapi 2 post parameter is always null »
I have been trying to figure this our for the last hour, but I can't see what's wrong with it the post is from a xamarin app that I'm writing, using ...
(2) odpowiedzi
2016-11-30 16:11 Multiple controllers with same URL routes but different HTTP methods »
I've got a following two controllers: [RoutePrefix("/some-resources") class CreationController : ApiController { [HttpPost, Route] public ......
(1) odpowiedzi
2016-11-27 18:11 WebApi unable to return to HttpClient »
It gets stuck after the end curly-brace when I am trying to call GetAllFiles() from HttpClient (MVC application). I can see the data in debug mode, b...
(1) odpowiedzi
2016-11-24 03:11 Configure webapi2 route to support different kind of GET requests (action/id) »
I would like to be able to support those URLs: // GET: api/Users returns a list (all) // GET: api/Users/5 returns the user ...
(1) odpowiedzi
2016-11-21 06:11 Unit testing using Nunit gives an error »
I just started with unit testing using Nunit with my WebApi project. I've developed one test case for my controller: private readonly INewsBusinessL...
(1) odpowiedzi
2016-11-19 21:11 Scaffold automatic WebApi Controller generation »
I'm learning Web Api and I'm a bit confused. When I create a controller for my Person class, how does it defines which method is GET, POST, DELETE? I...
(1) odpowiedzi
2016-11-19 14:11 How to use code first migrations to update a database? »
I made a c#.NET WebAPI and it worked when I changed the model it stopped working and it gives me the following error message. The model backing the '...
(1) odpowiedzi
2016-11-12 10:11 Configuring Route to allow dot as extension? »
Imagine the following: client app, which no one has control over, calls Web API methods but each of these methods ends in extensions such as : /api/...
(1) odpowiedzi
2016-11-08 17:11 Optional string input when following string inputs are not optional? »
I am trying to implement an interface as a service controller. I do not maintain this interface, so I am unable to modify it. For simplicity, let's sa...
(0) odpowiedzi
2016-11-08 01:11 Have a WebAPI Controller send an http request to another controller within the same service »
I have a WebAPI service, and I want it to send an http request to itself. I'd like to confirm what the most appropriate way of doing this looks like. ...
(2) odpowiedzi
2016-10-31 14:10 How to create a "sub-resource" using OData without creating a collection property for it? »
I'm creating a Web API 2 using OData v4 to provide the following HTTP verbs for my models: GET, POST and PUT, which means that for each resource (mode...
(0) odpowiedzi
2016-10-30 21:10 Reading an HttpError result from HttpResponseMessage without using exceptions »
I'm trying to pull an HttpError out of an HttpResponseMessage message which may or not be there. If the Api throws an exception it will be serialised ...
(1) odpowiedzi
2016-10-25 19:10 Cannot deserialize the current JSON array »
I'm trying to call a Web API from an MVC project to check to see if an employee has access to the app. I call a Web API passing the employee number an...
(2) odpowiedzi
2016-10-15 13:10 Can't figure out if OWIN is intercepting requests to api from client »
I have an Asp.net webapi with JWT authentication using OWIN middle ware. My resource server and the authorization server are same. I am able to get th...
(1) odpowiedzi
2016-10-14 17:10 C# JsonConvert.DeserializeObject creates bad enum »
I'm seeing an issue where I pass into my controller an int that is outside the bounds of my enum but JsonConvert.DeserializeObject still maps to the i...
(0) odpowiedzi
2016-10-14 00:10 HttpMessageHandler with MapHttpAttributeRoutes not working »
I'm follwoing this tutorial trying to get the behaviour of the MessageHandler3 in this image: This is part of one of my controllers: public class U...
(2) odpowiedzi
2016-10-04 06:10 What should be the return type of WEB API Action Method? »
I am developing ASP.NET Web API using .NET Core. This Web API is going to be mainly accessed by UI application (UI will be developed using ASP.NET Cor...
(1) odpowiedzi
2016-09-19 10:09 WebApi2 attribute routing recognize optional query string parameters »
I have a API action: [HttpGet, Route("{id}/overview/")] public async Task<HttpResponseMessage> Overview(string id, DateTime from, DateTime? t...
(1) odpowiedzi
2016-09-13 10:09 Why does the default http route does not contain {action} »
Why does the default Web Api 2 http routing not contains {action}: From the microsoft sample: // Configure Web API for self-host. HttpConfiguration...
(1) odpowiedzi
2016-09-13 03:09 Making async WebApi wrapper over existing code »
We are exposing our current logic/business layer using WebAPI. As per my understanding, if we want to keep our self safe from thread starvation for th...
(1) odpowiedzi
2016-09-10 00:09 AngularJs: $http.post always return 404 error »
I am currently trying to develop a simple angular js application. I am trying to post data from client to web api. However, I am getting 404 error whe...
(1) odpowiedzi
2016-09-07 15:09 ASP.NET Web API Contract Versioning »
We have created a web API to achieve versioning using content negotiation with the following architecture, public abstract class AbstractBaseControll...
(0) odpowiedzi
2016-09-04 04:09 404 error on azure for Asp.Net Web Api Project »
I have deployed exact same solution on two servers, one is my own server in my basement and the other one is Microsoft Azure. The project is developed...
(1) odpowiedzi
2016-09-03 21:09 File upload issue with cross domain Issue Angularjs + Web API »
I am trying to upload csv file from angular POST to Web API post but Eeb api return below error "XMLHttpRequest cannot load http://localhost:89/W...
(1) odpowiedzi
2016-08-31 10:08 How should i return data in Web API Controller Methods? »
I have a UI that needs lots of information. Most of the information has been identified as separate entities in database. For example, displaying the ...
(1) odpowiedzi