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

Proper Return type for IHttpActionResult

I have a complicated Web API 2 controller method that has to return a range of messages to the user along with the return code, depending on the action being performed. I have a standard error routine...

View Article


How to return record count with web api

Hi All,My first time to create a web api. I wrote a controller to return the records in json format, it is a list collection object. Now I want to use AngularJs to do pagination. How do I return total...

View Article


overview of web api`s

does anyone know if there is an overview website of web api`s ?so a website that lists web api`sBest regards,Bradly

View Article

Issue with only receiving partial POST data in a Web API using c#

I have two C# applications, one is a Windows Service that reads systems and installed applications data from the PC it is installed on. The other is a Web Service that accepts a POST.The windows part...

View Article

WEBAPI default page shows directory contents

When I launch my WebApi restful service app on localhost,   the default browser window shows the contents of the current project folder : 2/14/2017 2:23 PM <dir> App_Data 2/14/2017 2:23 PM...

View Article


How can Attribute [Auhorize] Web API read access token OAuth2

As my subject , I want to know AuthorizeAttribute Web API can read access token ?

View Article

Custom Sample in WebAPI Help Page

I implemented one custom media formatter to provide pdf file. I created custom formatter with 'UriPathExtensionMapping' as media type mapping. All working fine and i can get the pdf file. Currently I...

View Article

how to secure web api data passing

If i bind certificate with my web api hosted in iis then do i need to turn on basic auth? Please tell all possible ways to secure my web api data pass back and forth between client and server.

View Article


What is difference between post,put and delete

We can have web api action with many http verb like post,put and delete. We know that post is used for insert operations and put used for update operations but we can do update operation in post and...

View Article


.net Standard Library for creating web api

Hi ,I'm very new to this .net standard library concept. So my question would be really basic or dumb, sorry in advance.Can i create a Web API project in visual studio 2015 using .NET standard library...

View Article

parameter (body post) of my Asp.net Web API SignalR hub is always null

Hi , here is my serverpublic class MonitorController : SignalRBase<monitorHub> { [Route("api/Category")] [HttpPost] public async Task<IHttpActionResult> Post([FromBody] Category item) { if...

View Article

How to show web api put verb is idempotent

i searched google a lot still got no good explanation with example. mostly all write up is saying put is idempotent and post is not but i need a sample code which discuss or show idempotency of put...

View Article

New to Web API.

Hey There.New to Web API and am stuck for about a week now.I am following this articleThe author is using Angular for his client controller and is fetching records from a database, and I have...

View Article


WebApi Routing

Hi,In my web api I have following class and methodspublic class SfAiController : ApiController { public List<SfAiDTO> Get() { DBService objDB = new DBService(); return objDB.GetSfAi(); } public...

View Article

How to trace log webapi

Hi,I am new to WebApi.Can some body advise me how to make logs of webapi and how to handle and response error details back to the caller, thanks.Regards,SAR

View Article


problem downloading pdf from web api

I am prototyping streaming a pdf file from a Web API, and after the download, I double click on the file and it says "Can't open this file. There's a problem with the file format". From what I can see...

View Article

outputstream is not available when a custom textwriter is used asp net

I have created a HttpResponse object inside a web api method as shown below and write some text into it. I need to read the HttpResponse.OutputStream into a Stream, but it throws the below exception....

View Article


How to Hide the Key Properties in OData .

Hi,Am working on OData with Entity framework.Currently am using  "Code First" to implement the Odata Services.As per the entity framework we must need key property in order to build edm model file.In...

View Article

Easy Log library for web api and console app (c#)

I understand Enterprise Logging is difficult to configure for web api.What is the easy to use, install and configure Log libary for web api and console app?I just would like to write log to log file...

View Article

Web API 2 OAuth - GetExternalLoginInfoAsync always return null

Hi, I have VS2013 Update 2 - Web API 2 OAuth problem. follow step:1. Visual Studio 2013 is Update 2, New Web API Project, Click Change Authentication, Select Individual User Accounts.2. In...

View Article
Browsing all 4850 articles
Browse latest View live


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