Result in empty
Am new to API, I started program using EF5 models and creating a controller using scaffolding,While passing URL localhost/5505/api/controller/xxx its shows the results has empty or null string like []....
View ArticleInt32.cs not found
I'm trying to remote debug my WebAPI and when I get to a line that calls a method in a referenced assembly I get the error "Int32.cs not found, You need to find Int32.cs to view the source for the...
View ArticleWebApi /w POST /w body data /w origin "*" /w attribute routing /w Chrome,FF,IE
Using WebApi2.2 /w POST /w body data /w Chrome /w attribute routing and /w "Access-Control-Allow-Origin", "*" because there is no way my server can ever predict who will be calling the WebApi. I need...
View ArticleAPI to default to JSON
I have a web api built using the entity framework for web forms and it will return json or xml, depending on the content type. The problem I have is, it's default is xml. Is there a way to make it so...
View ArticleODataController Created method returns only first level properties of creaded...
I noticed ODataController Created method returns only first level properties of creaded entity.So a "Customer" entity is returned to the caller, but not its Address related entity. This is the default...
View ArticleHow do you often search and select Web APIs?
We are researchers in software engineering area. Now we are investigating how to support web developers by conducting an academic survey on web apis.Please help us with this survey:...
View ArticleProblem with Post in HotTowel with AngularJS
I believe this is a routing issue, I get multi action error.var datapa = "{'PA': ["+ JSON.stringify(vm.orderEntry.pa) +"]}";var dataod = "{ 'OD': ["+ JSON.stringify(vm.orderEntry.od) +"]}"; var datafd...
View ArticleFile upload using MultipartMemoryStreamProvider
I am looking for a way to implement file upload without writing to the file system.So far I have only seen samples (that work with RTM) that writes to the filesystem.What I would like is to create an...
View ArticleAdding WebAPI to an existing website project in Webforms
I have an existing website project in WebForms ( not MVC) and I tried adding a Web API (v2) item to my website project in Visual Studio 2013 and ended up with errors like ApiController class was not...
View Articleinject httpmodule in iis in webapi project
Hi,kindly, i have iis 6.1 svc pk1 & webapi2.1.What i want is: inject an httpmodule within the iis pipeline which registers an event handler which will be fired if unhandled exception happen.what i...
View ArticleProject Structure - WebAPI and Service Layer
I would like to build a Project using latest technology . e.g. would like to get user information and generate a report into MVC we application . this feature can be used by other client as well. I am...
View ArticleRemove 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 ArticleWebApi2 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 ArticleAuthorization/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 ArticleCaching in Web API
I have got a requirement in which i have to write a service which accesses data from third party data source and one of the instructions given by client isCalling the third party data source is costly...
View ArticleUsing "%3A" in URL yields HTTP 400
Is there a work around for sending a request with %3A in the URL? I am using %3A to pass colons in the URL, for example 14:52:12. However, the API returns a HTTP 400 Status Code.
View Articlerequest unique id
I'm working in Web APII need to uniquely catalog each request. I'm wondering if ASP.NET intrinsically provides a request id ? ( I've browsed through HttpRequest and HttpRequestMessage )Or do I need...
View ArticleUpdating database using GET verb rather than PUT verb
Normally, the recommendation in Web API for performing a database update operation is to use PUT verb.But I can also update a database by calling a GET Web API method, provided I have the appropriate...
View ArticleWebApi OData 4.0 -- Trouble with Navigation properties
Hi!I'm hoping to user WebApi with OData for an api I'll be developing.I'm delving into OData v4 with WebApi 2.2 and am having an issue with a navigation property between two classes from an existing...
View ArticleHttpResponseException where's the error message ?
My Web API controllers throw runtime exceptions as follows : HttpResponseMessage message = HttpRequestMessage.CreateErrorResponse(code, text); throw new HttpResponseException(message);In my nUnit...
View Article