Quantcast
Channel: Web API
Browsing all 4850 articles
Browse latest View live

How to add OData v4 Endpoint (using asp.net web API 2.2) to MVC client...

Hi,I am new to web api. I have created an OData v4 endpoint using asp.net web API 2.2 using VS 2013. I have followed this article...

View Article


How to consume web api from controller

I have a solution inside that there are two different projects.One project is of asp.net MVC and other project is asp.net web api that contains CRUD methods. Now i have to call web api from mvc...

View Article


Remove the OData innererror from production services - Security issue

The spec for Error Response says:The value for the innererror name/value pair MUST be an object. The contents of this object are service-defined. Usually this object contains information that will help...

View Article

Where is the Web API documentation?

I'm building a Windows service that host a webservice with SOAP and Web Http endpoints written using WCF and WCF Web HTTP. I'm using VS2012 and have the latest Dotnet Framework 4.5 documentation fully...

View Article

Web API: XmlMediaTypeFormatter: ModelBinding fails when posting XML using...

I've been putting together a service using Web API, and I began testing some of the functionality recently. This particular service uses XML and ISO-8859-1 as an acceptable character encoding. I've...

View Article


WebApi2 POST. Controller return CreatedAtRoute but no record inserted.

Subject pretty clear explaining my problem. When I'm trying to insert new record using POST action of WebApi Controller, it returning CreatedAtRoute object with Id that always null. Controller code are...

View Article

[ODATA_v4] - Odatacontroller and [FromBody]

Hello,I meet a problem when a call URI ODATA Controller with DATAs in POST HTTP Action. No binding between the parameter of my function and the Json data in BODY Request.But when I put a breakpoint in...

View Article

Custom property name binding

Hello!When application/json or application/xml post to method I can use DataContract for custom property name binding:[HttpPost] public string Method([FromBody]Model request) { } [DataContract] public...

View Article


Authorization/Authentication of iframe request to REST

We have a GET REST call (/api/something/export) on our ApiController that uses PushStreamContent to publish a file.  In the browser we're using jquery.fileDownload plugin to execute a download/save.The...

View Article


Pro ASP.NET Web API

Hello people, i am in Nigeria and a student, I really want to understand and develop application with Web API, but I don't have the cash to buy Pro ASP.NET Web API.Please can anyone send me the pdf...

View Article

MapRoute Not Working

I have the following:routes.MapHttpRoute(     name: "DefaultApi",    routeTemplate: "api/{controller}/{id}",    defaults: new { id = RouteParameter.Optional } );routes.MapRoute(    name: "Default",...

View Article

WebApi 2.0 on Web Servers/DMZ but SQL and Auth servers in internal network

Hello, I have a www -> DMZ(web servers) -> Firewall -> Internal Network configuration. WebApi 2.0 services need to sit in my DMZ, but the WebApi reads and writes data from and to a SQL server...

View Article

OData Custom Filters

Hi, I am developing some OData Services. And i am trying to provide filtering on Dates.For e.g.If i enter a URL like - http://localhost/odata/products?$filter=last30days(start_dt) return all the data...

View Article


How to accept underscore(_) as JSONP callback...

Hi,I have to make BOTH underscore( _ ) and callback acceptable for my WebAPI.I am using JSONPeg:...

View Article

Validate List using [Range] attribute

Hello,I am trying to validate the range of a list of objects (List<Object>). public class Model{private List<Object> objects;[Range(1,3)]public List<Object> Objects{get{ return...

View Article


Using System.ComponentModel.DataAnnotations.Validator with...

Does anyone have an example of combing the Validator class with a ValidationAttribute?

View Article

API Routing Problem, 200 in dev, but 404 on servers

So my project is using MVC 5 with Web API 2.2, Entity Framework, and AngualarJS.  I have about a dozen API Controllers that are working perfectly in my dev environment, but when I published the...

View Article


Web API 2 / REST - why does Chrome sometimes display XML, sometimes JSON?

Hi all;First off, do I need to specify "Web API 2" in my questions? It's still in beta and is quite different so I am assuming that it is necessary. If not, please let me know.When I run under the...

View Article

Need help in implementing security in web api.

Hi all,        I have to implement Authentication and Authorization in WEB API, I need some guidance, from where i need to start, like any tutorials or approaches.

View Article

Web api app pool reloading

What to do whena siterequires access towebapi,a pool ofhisapplication at this timeis reloaded?

View Article
Browsing all 4850 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>