Data dodania Pytanie
2017-02-22 18:02 How do I configure Web API .Net core to accept Binary JSON? »
In Web API 2.1 I register BSON with the following: public static class WebApiConfig { public static void Register(HttpConfiguration config) {...
(1) odpowiedzi
2017-02-22 15:02 Setting up HttpClient in .NET to make it work with multiple threads and to provide concurrency »
After reading the posts below about recommended usage of HttpClient, I changed my code from instantiating HttpClient per request within a using block ...
(3) odpowiedzi
2017-02-21 22:02 Custom [Authorize] message on 401 »
I need to deliver custom "not authorized" message in different languages, instead of the default "Authorization has been denied for this request". I'm...
(1) odpowiedzi
2017-02-21 14:02 Log4net LogicalThreadContext parameter's value is null after await »
I have this code snippet to an owin middleware public class SetCurrentActionInfoMiddleware : OwinMiddleware { public SetCurrentActionInfoMid...
(0) odpowiedzi
2017-02-21 07:02 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 it like this: public IHttp...
(3) odpowiedzi
2017-02-20 22:02 REST API Design: How to break down the API object to make more scalable and robust API »
We have e-commerce websites for mobile phones. We are building restful api to POST,PUT,DELETE,UPDATE mobile phones. Every mobile phone will have basi...
(3) odpowiedzi
2017-02-20 22:02 REST: Can we partially execute a POST/PUT/DELETE resource for API executing multiple request at the same time »
We are an ecommerce company and we allow our dealers to list multiple products in one go. Simplified version of API looks like: { "dealerId":1, "...
(1) odpowiedzi
2017-02-20 12:02 Hiding multiple web services behind one? »
There is a system with a rather big amount of different small services. The idea is to hide them behind one, which is going to be an entry point to th...
(1) odpowiedzi
2017-02-19 22:02 Telerik Html5 report viewer client side parameters not being applied »
telerik reports ver Q2 2014 SP1 (8.1.14.804) I Implemented an asp.net mvc 4 web api report server using the default ReportTypeResolver. Reports are d...
(1) odpowiedzi
2017-02-19 19:02 Newtonsoft Json.Net Null Or Empty String Conversion »
When a web api expects an int value, if the client sends null or empty string in JSON, it is automatically converted to 0. How can I prevent this? Is ...
(3) odpowiedzi
2017-02-19 18:02 How to read upload data from Stream and FormData in one method? »
I want to upload file and some FormData to server. I'm did it like that and it is works: public byte[] LoadUploadedFile(HttpPostedFile uploadedFile) ...
(1) odpowiedzi
2017-02-18 23:02 c# WebApi.SelfHost post is null »
I am using the WebApi.SelfHost but my Post is always null. I tried all the solutions I could find on SO, but none of them worked. I'm stuck with this...
(1) odpowiedzi
2017-02-18 19:02 Hosted WebApi application always prompt login »
I have hosted a ASP.NET WebApi application w/ Angular2 in the front end on godaddy. On the server I have enabled: My web.config in the web.api proj...
(0) odpowiedzi
2017-02-18 09:02 Json response based on parameter in webapi »
My API controller method is public IQueryable<Team> GetTeam([FromUri] string include = "") { return from c in db.Team select new Team { id...
(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-17 10:02 Multiple independent locks on several objects »
There are several folders on back-end of Web API server. Each of them is a git repository. Let's call them Project1 Project2 Project3 How can I cr...
(1) odpowiedzi
2017-02-17 07:02 How to show a byte stream response »
My REST API returns a PDF document in bytes and I need to call that API and show the PDF document on the ASP page for previewing to the user. I tried...
(2) odpowiedzi
2017-02-16 18:02 Attribute routing returns 404 »
but I am new to attribute routing, and I have no idea why this isn't working while everything else does so I have this [RoutePrefix("api/statistics")...
(2) odpowiedzi
2017-02-16 17:02 C# WEB API CORS does not work »
Fighting with CORS. I have a site that is making a simple XmlHttpRequest to a WEB API I built in C#. var xhr = new XMLHttpRequest(); xhr.ope...
(2) odpowiedzi
2017-02-16 15:02 best practice for using async await in webapi »
i have .net core webapi which as service layer. service layer has all ef code. if have basecontroller with this code protected Task<IActionResul...
(2) odpowiedzi
2017-02-15 19:02 Authorization with Asp.Net Core WebAPI »
Admittedly, this is a first stab at building an Asp.Net Core web api project.. One requirement is to support OAuth2. The Api and Identity server are ...
(2) 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-15 15:02 How to compress and cache files with IIS when filename is determined by ASP.NET Web API controller »
I have a ASP.NET Web API with the following controller action for serving possibly large (<1-200MB) 3D models which are stored in JSON format somew...
(1) odpowiedzi
2017-02-14 17:02 Retrieving a subset of rows from an OData endpoint »
I've an ASP.NET Web API 2 exposing an OData endpoint. In the front-end I'm using ASP.NET MVC 5. To consume the endpoint I'm using a WCF Services Refe...
(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-14 07:02 how to return multiple json objects as HttpResponseMessage through Web API? »
I'am having problem in getting multiple Json objects using HttpResponseMessage How can this be acheived without wrapping string as Json? This is the...
(1) odpowiedzi
2017-02-13 12:02 How to debug a code that has no trace of my code in its stack trace? »
I have a web API application, and I get this error: at System.Collections.Generic.List`1.Enumerator.MoveNext() at System.Linq.Enumerable.<ConcatIt...
(0) odpowiedzi
2017-02-13 11:02 C# EF ASP.NET Web API timeout - how can I call a long running query? »
I have a C# code that I want to execute. str = "SELECT u.LastName " + ",COALESCE(COUNT(DISTINCT pc.PhraseId), 0) AS CreatedB...
(2) odpowiedzi
2017-02-13 09:02 How to use Route attribute to bind query string with web API? »
I'm trying to get this to work: [Route("api/Default")] public class DefaultController : ApiController { [HttpGet, Route("{name}")] public str...
(2) odpowiedzi
2017-02-12 12:02 How to fix this WebAPI ODATA error: "Parent id or contained context url is missing which is required to compute id for contained instance"? »
I have an ODATA server built with WebApi where my container has only an entity set of 'calendars'. In turn, each 'calendar' has a navigation property ...
(0) 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-12 04:02 WebAPI model binding complex type - JSON object to collection »
I have the following method signature on a WebAPI endpoint: [HttpPost] public async Task<IHttpActionResult> AddShopping(List<ShoppingList&gt...
(0) odpowiedzi
2017-02-11 23:02 Handling a constructor that throws in a Controller method parameter? »
I am making a small Asp.net Core Web API project. I have a model object that looks like this: public class Order { public readonly int Quantity; ...
(1) odpowiedzi
2017-02-11 21:02 Securing access to .NET Web API from both MVC client app and mobile applications »
I have created a Web API application, an MVC application, and a mobile application. The Web API should be decoupled from the other two applications a...
(1) odpowiedzi
2017-02-11 18:02 consuming web api, ports on different machine »
my simple web app has web api and web mvc project. from mvc app I'm consuming web api service using ajax. Right now my uri looks like this var uri ...
(3) odpowiedzi