Data dodania Pytanie
2017-02-03 15:02 Json get array object from JSON Object C# »
I have this json string passed to my webapi string jsonstring = "{\"datamodel\": \"[{\"K1\":\"V1\",\"K2\":\"V2\"}]\"}"; I may have more than on p...
(4) odpowiedzi
2017-02-03 09:02 Complement [FromUri] serialization with APIController »
We have multiple API controllers accepting GET requests like so: //FooController public IHttpActionResult Get([FromUri]Foo f); //BarController public...
(1) odpowiedzi
2017-02-02 20:02 Webapi 2 controllers on 2 projects »
I have a webapi2 C# projects on which I have all the controllers in a controllers folder. I now have some functionality that I want to add but I want ...
(5) odpowiedzi
2017-02-02 18:02 Sending an array of json objects to web api, how to format the url? »
I have written asp.net web-api project with following api-s: Controller Method: Uri: GetAllItems: /a...
(2) odpowiedzi
2017-02-02 11:02 How to post complex object including lists to ASP Web Api 2 »
I am trying to post an complex object wich include several list/arrays of strings, via an jquery ajax call. Only the scalar properties of the object s...
(1) odpowiedzi
2017-02-01 17:02 RESTful API Naming Resources & Controller design »
Just reading through some RESTful API design best practices. I am coming from an ASP.Net Web Forms background where I have been calling code behind W...
(2) odpowiedzi
2017-02-01 05:02 MVC combined with WebAPI in ASP.NET Core, but where are the Views? »
I'm trying to come to grips with the new ASP.NET Core 1.0 which states that both ASP.NET Web API and ASP.NET MVC are combined into one framework. So I...
(1) odpowiedzi
2017-02-01 02:02 No HTTP resource was found that matches the request URI - Web API + Angular »
When I'm trying get some data with parameter (type DateTime) from Web API, I'm getting response with error 404: Message : "No HTTP resource w...
(1) odpowiedzi
2017-01-31 12:01 Does WebClient has HTTP connection pooling? If no, does HttpClient have it? »
I want to consume a rest api from my code. Now, for this, I can use WebClient or HttpClient. However, HttpClient has connection pooling support, as m...
(0) odpowiedzi
2017-01-31 11:01 Asp WebApi: Prettify ActionResult JSON output »
I'm working on REST service based on ASP.NET Core Web API and want to add a parameter 'prettify' to my endpoint so that response json will be formatte...
(2) odpowiedzi
2017-01-31 09:01 Using async/await or task in web api controller (.net core) »
I have a .net core API which has a controller that builds an aggregated object to return. the object it creates is made of data that comes from 3 meth...
(3) odpowiedzi
2017-01-30 18:01 How do I format a JSON result in ASP.NET Core MVC Web API? »
Web API will return JSON automatically, but what if I want it in a different layout. For example, if Web API returns, [ { "patron": 9, ...
(1) odpowiedzi
2017-01-30 18:01 How to change Web Api Core unauthorized behavior »
The default ASP.NET Web Api Core behaviour for unauthorized request is to send 401/403 error with empty content. I'd like to change it by specifying s...
(1) odpowiedzi
2017-01-30 09:01 ASP.NET infrastructure in MediatR handlers »
I prefer to keep my handlers free from ASP.NET infrastructure that is very hard to test (yes, even in ASP.NET Core). But sometimes it happens and you ...
(2) odpowiedzi
2017-01-29 20:01 Unable to get mvc webapi bearer token after hosting on server »
I'm working on the securing the web API by OAuth bearer token as this working fine in local able to generate token, After hosting on server code is no...
(0) odpowiedzi
2017-01-29 08:01 How to load images with Ajax jQuery into a slider while others images are being uploaded at the same moment? »
Any idea of how load images into a slider with Ajax jQuery making several requests to my DB (I will use a Web API architecture in .NET and the request...
(0) odpowiedzi
2017-01-29 08:01 How to pass model to WebApi controller? »
I am in need to write WebApi controllers. The task is to migrate from exisitng normal mvc controller to WebApi controllers. In this projects, almost ...
(2) odpowiedzi
2017-01-28 23:01 Set the type of registered Service during runtime within an action filter/message handler »
public class ActionFilterVersionAttribute : ActionFilterAttribute { public override void OnActionExecuting(HttpActionContext...
(1) odpowiedzi
2017-01-28 05:01 passing FormBody parameter when using attribute routing on Web API »
I've declared very simple API method [RoutePrefix("api/reports")] public class HomeController : ApiController { [HttpPost] [Route("person...
(0) odpowiedzi
2017-01-28 03:01 AJAX POST to Web API Controller and CSRF »
I basically need to protect against Cross Site Request Forgery in my Web API Controller that's a part of an MVC application. I am open to any ideas. ...
(2) odpowiedzi
2017-01-27 11:01 Read first bytes of body when "Maximum request length exceeded" »
I have a ASP.NET WebAPI application and some of the request exceed the maximum lenght. That's fine, I know I can increase the limit either in IIS or w...
(1) odpowiedzi
2017-01-27 11:01 The type or namespace name 'UnitOfWork' could not be found »
I am new to IOC & unity. Below is my Bootstraper class in WebApi project. public static class Bootstrapper { public static void Initialise(...
(1) odpowiedzi
2017-01-27 02:01 Does SignInAsAuthenticationType allow me to get an OAuth token without overwriting existing claims? »
I need a user to login to a website using out of the box authentication to Facebook. I now need to link to the users drive in Google (and other servi...
(1) odpowiedzi
2017-01-26 22:01 How to use DI with UserManager and UserStore »
Given a typical setup of a MVC controller constructor passing UserManager (which takes UserStore) to it's parent class, how would this be converted to...
(1) odpowiedzi
2017-01-26 15:01 Routing an Angular 2 app with Web API »
I have an Angular 2 application created with Angular CLI. This has to call a .NET 4.6 Web API. The route setup of this is driving me nuts. For Angula...
(2) odpowiedzi
2017-01-26 11:01 ASP.NET Web API IExceptionLogger called twice »
My exception logger implementing [IExceptionLogger][1] is called twice when an exception is thrown from a controller action. context.RequestContext....
(1) odpowiedzi
2017-01-25 21:01 Is it possible to use ASP.NET Core Web API and Views with Razor and get Intellisense? »
If I build a Web API Project in Asp.Net Core 1.x, and I want to build the front-end in the same Project or Solution, is it possible to create front-en...
(0) odpowiedzi
2017-01-25 12:01 EF 5 Composite Primary Key (won't work for some reason) »
I am aware this may be a duplicate question, but I've tried using the answers provided to similar questions and I've not had any success. The situati...
(1) odpowiedzi
2017-01-25 10:01 Websockets using OWIN »
All the examples using Microsoft WebSockets over a web-api that I've seen so far use IIS, the implementation is on the get method the HTTP connection ...
(0) odpowiedzi
2017-01-24 20:01 Microservices vs multi-layered architecture »
My project has one backend service (Web API) and one frontend SPA application. Backend service has presentation, application services, domain and infr...
(1) odpowiedzi
2017-01-24 10:01 Exclude fields in WebAPI response »
public class Order { public decimal Id { get; set; } public decimal customerId { get; set; } public string payment_method { get; set; } ...
(0) odpowiedzi
2017-01-24 10:01 Web API 2 services - how to return an Exception message in the Status »
Is it possible, in Web API 2 to directly return the Exception message in the response's Status ? For example, if I was writing a WCF Service (rather ...
(2) odpowiedzi
2017-01-23 17:01 ASP.NET MVC route with .asp extension »
EDIT: The 'duplicates' are not working - not sure why exactly. I need to be able to support an ASP.NET WebApi (v5.2.3.0) route that looks like this...
(1) odpowiedzi
2017-01-23 10:01 ASP.NET Core Web API: Why need ModelState validation in Get request? »
VS 2015 automatically generated the following code: // GET: api/Companies/5 [HttpGet("{id}")] public async Task<IActionResult> GetCompany([From...
(1) odpowiedzi
2017-01-23 04:01 ASP.NET Core API POST parameter is always null »
I have read the following: Asp.net Core Post parameter is always null asp.net webapi 2 post parameter is always null web-api POST body object always...
(2) odpowiedzi