ASP.NET Web API is a framework for building HTTP services for clients like browsers and mobile devices. It is based on the Microsoft .NET Framework and ideal choice for building RESTful services.

learn more… | top users | synonyms

0
votes
0answers
8 views

Recommended approach to hosting a two-tier web application in Azure Web Sites

I'm fooling around with a WebAPI application I've developed in two solutions: one solution is the WebAPI / serverside solution with db access using SQL server, the other is a durandalJS client ...
0
votes
0answers
5 views

Do browsers only send MS Office Content-Type MIME types if the client has MS Office installed?

I think I already know the answer to this question, but checking here just to be sure. One of our developers was seeing a bug that no one else was seeing. When uploading .xls and .ppt files, one of ...
0
votes
0answers
7 views

Compilation error on Custom MediaTypeFormatter with .Net 4, Web API and Visual Studio 2010

I am implementing a custom MediaTypeFormatter and I am getting a compilation error on the overriden method ReadFromStreamAsync as shown in the code example. For work reasons I can't update to Visual ...
1
vote
2answers
41 views

How to store temporary data for ASP.NET Web API?

I understand that the web api should be stateless and Session is not recommended for storing temporary data, such as userId, studentId. In some case, I do need a place to store those temporary data ...
0
votes
1answer
22 views

What strategies exist to accomplish transactions over an OData service layer?

Consider the following example: An OData service layer exposes Order and OrderLine resources. A consumer retrieves an Order and its related OrderLines. The consumer edits the Order, edits 1 ...
0
votes
1answer
22 views

Monitoring all the information of users using mvc 4 web api

I have a REST service based on mvc 4 and web api. I need to monitor all the users who are using my service (eg: user name , organization that user belongs to, how many hours he is accessing service ...
5
votes
2answers
55 views

ASP.NET Web API removing HttpError from responses

I'm building RESTful service using Microsoft ASP.NET Web API. My problem concerns HttpErrors that Web API throws back to user when something go wrong (e.g. 400 Bad Request or 404 Not Found). The ...
-1
votes
1answer
23 views

Web API won't deserialize json post to EF type

Yesterday I had a working Web API implementation. I come in today and my post parameters no longer deserialize into my entity objects Here is my api Controller code: public class ...
0
votes
2answers
22 views

Url has ?_=*Number* after each GET call?

I have been setting up a mvc project with a webapi. I have it working but I do not know why my GET calls have additional pieces to their URL's. Example: /api/User/Zholen?_=1373490280823 Can someone ...
0
votes
1answer
17 views

Calling method from MVC “Controller to WEB API Controller” Asynchronous?

Hi i am basically doing a Mobile Website in MVC 4 and a WEP API within one project. The mobile website will have access and features to control the backend WEP API. The end users will use native ...
1
vote
1answer
25 views

Using [FromUri] Attribute in MVC 4 (not Web Api) - Bind complex object with nested array

I want to send a complex object with a nested array in the uri to an MVC action method in a GET request. Consider the following code: public ActionResult AutoCompleteHandler([FromUri]PartsQuery ...
0
votes
1answer
27 views

Custom action in EntitySetController generate 501 Not Implemented

Domain objects with many to many relationship: public class Customer { public int Id { get; set; } public string CompanyName { get; set; } public string Phone { get; set; } public ...
1
vote
2answers
25 views

Entity Framework listening to SQL Server changes

I'm working on the following scenario: I have a console up that populates a SQL Server database with some data. I have one more web app that reads the same database and displays the data on a ...
0
votes
2answers
36 views

Long running task in WebAPI

Here's my problem: I need to call multiple 3rd party methods inside an ApiController. The signature for those methods is Task DoSomethingAsync(SomeClass someData, SomeOtherClass moreData). I want ...
0
votes
0answers
27 views

ASP.NET Web API model binding complex object with non-sequential list

I am attempting to model bind a complex object with a non-sequential list using an ApiController. All of the fields except the list are set correctly, but the list contains one element (even though ...
1
vote
1answer
43 views

How do I control the ETag header in MVC 4 Web API?

I want to use a custom DelegatingHandler to add the E-Tag header to responses for some of my Web API calls. Here is part of my SendAsync() override: if (request.Method == HttpMethod.Get) { ...
1
vote
0answers
21 views

.Net Web API Routing & Help Page

I am struggling to get the API help page to show all my API endpoints, and to show them in the style I want. Here are my routes: config.Routes.MapHttpRoute("Orgs", "v1/Orgs/{orgId}", new { ...
0
votes
1answer
29 views

ASP.NET web api SPA project layout

I am building a proof-of-concept line-of-business Single Page App. I want to use ASP.NET web api for the REST service layer, and Backbone.js and Require.js on client. I would like to use modular ...
1
vote
0answers
21 views

Request fails for photo upload Phonegap with Forms Authentication

We are developing a PhoneGap application where in we have photo upload functionality. If I enable FormsAuthentication in WebApi the photo upload fails. So we found that it was failing because ...
1
vote
1answer
43 views

REST javascript client

Are there any best practices for javascript REST clients. Specifically, I would like to know how to follow links. Let say I have a Task class public class Task { public long TaskId { get; set; } ...
0
votes
1answer
31 views

web api route error - multiple actions were found

I know there has been a ton of these questions, but I can't seem to figure out why I'm getting a "Multiple actions were found that match the request: " error when calling the PostEmailTemplate action. ...
0
votes
1answer
32 views

Entity Framework 5 with Web API

I am looking for the simplest, best-practice approach to building a web app using EF database-first approach and the MVC 4.5/Web API. My application will use the angular framework to make ajax calls ...
0
votes
1answer
28 views

How to get actual objects from C# Web API DbSet?

I'm trying to get a list of 'recent' donuts that have been added to the box (database) since I last checked. I'm a fatty and want some delicious noms. The problem: the server is giving me JSON that ...
1
vote
0answers
19 views

WebApi JSONP Performance Hits

I've got to make some cross domain calls to a hosted webapi service that we have from a javascript client so I have hooked up the WebApiContrib.Formatting.Jsonp formatter to handle this and it works. ...
0
votes
0answers
14 views

What is the difference between an Azure Web Site and an Azure Web Role (July '13 edition)

Context: Building new multi-tenant application using Azure SQL, Azure Table Storage, EF, Web API, MVC, Azure Cache, Possibly Worker Roles -- all the usual suspects: Please see prior question ...
0
votes
1answer
19 views

Authentication error in Node.js

I am trying to make a WebAPI call from server script and i am getting authentication error: This is how my server.js looks like: var app = require('http').createServer() , io = ...
0
votes
3answers
39 views

Flags enum and JSON in JavaScript

I have many C# enums, and some of them have flags enabled. For example: [Flags] public enum MyEnum { item1 = 0x0000, item2 = 0x0008 } I cloned this into JavaScript with something like this: ...
0
votes
2answers
74 views

how to pass Parameters Info from the Body in ASP.NET Web APi?

I'm trying to pass a lengthy string through my POST methond from the actual body, it works perfectly fine if I pass it through url but I dont know what to change so I can insert data from body ...
0
votes
1answer
15 views

asp.net web api odataNo IdLink

I'm using Odata with web api and get this error: <m:innererror> <m:message> The 'ObjectContent`1' type failed to serialize the response body for content type 'application/json; ...
0
votes
1answer
30 views

How to validate token, in ASP.NET Web API 2, which is provided by new OAuth 2 end point of ADFS that is part of Windows Server 2012?

Recently, MS have spoken in build 2013 conference session titled "Securing Windows Store Applications and REST Services with Active Directory" and video posted at ...

1 2 3 4 5 135
15 30 50 per page