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
5 views

How to read File with my WebApi Custom MediaTypeFormatter

i'm creating a ASP.NET MVC WEBAPI application where i'm actually implementing a Custom MediaTypeFormatter to deal with some type of contents. (csv for example) My goal is Read a file posted from a ...
0
votes
0answers
11 views

Host Web API in IIS using FTP

Masters, I am facing a deployment issue of Web API. We've two separate projects. An MVC4 Application A Web API service project We consume web api in our web project for fetching data. And we've ...
0
votes
2answers
14 views

PostAsync HttpClient error with Web Api - System.AggregateException “A task was canceled.”

I'm trying to call PostAsync method using System.Net.Http.HttpClient from the Web API. I get the following error: System.AggregateException "A task was canceled." Task: Id = 1, Status = ...
0
votes
1answer
13 views

Cross project default UI for MVC WebAPI

Since the WebAPI doesn't provide UI for client, that means every client has to build their own presentation themselves. We have many developers and projects that want to consume the same WebAPI ...
6
votes
1answer
79 views

Vulnerability testing in ASP.NET MVC

I have been involved in test based development on ASP.NET MVC and ASP.NET WebAPI using NMock unit test, however most of the unit tests that I write revolve around testing functionality. From the ...
0
votes
0answers
21 views

Authenticate to web api from client app with oauth

How are oauth credentials usually transfered from client app to the web api? E.g. how can a user login in android app with facebook and consume asp.net web api with those credentials?
0
votes
1answer
35 views

Html.BeginForm routing to Web Api

I am trying to get my page to post to my Web API controller, rather than my Area/Controller/Action. Here is what I have so far, I have tried using both Html.BeginForm and Ajax.Begin Form : @using ...
0
votes
0answers
22 views

Two legged OAuth authentication with Web API

Over the last few weeks I've been reading anything I could get my hands on about authentication and the different methods for securing and authenticating a user through a RESTful service, more ...
1
vote
0answers
41 views

Missing request.CreateResponse in vb.net Webapi Projects

I seem to have tracked down the problem but do not know how to fix it, or if I can. When I create a new C# WebAPI project, and add an import for System.Net.Http I can access ...
0
votes
0answers
16 views

Using Expand on List property: The argument must be of type 'IEnumerable'. OData

I use Asp.Net Web Api with OData(5.5.0-alpha2). And I have a model: public class Model { public List<Event> Events { get; set; } public List<User> Subscribers { get; set; } ...
1
vote
0answers
23 views

Unity WebApi container is created every time

i am creating a simple web service using web api MVC 4, i am using Unity web api as my IOC, how ever in the documentation it said to add it to the application_start protected void Application_Start() ...
0
votes
1answer
27 views

ASP.NET Web API unable to format XML for a generic object array

In the hopes of supplying more metadata to my application, I wanted to wrap some extra information around my database queries (using plain on SQL data access, no Entity Framework or other ORMs). I ...
0
votes
2answers
32 views

one aspnet webapi controller with two get methods and getting Multiple actions were found that match the request

When calling http://mysite.com/Project/42 for the routing and methods below I get a "Multiple actions were found that match the request...Get(Int32)...Children(Int32)" while calling ...
0
votes
1answer
19 views

aspnet webapi method that takes Project/42/Children - how?

I can't figure out how to write the method signature for a REST(ish) AJAX call in Aspnet WebAPI. My route is recognised but I get a "No HTTP resource was found that matches the request URI..." I try ...
2
votes
0answers
33 views

Patterns for handling scheduled/unscheduled downtime using ServiceStack and WebApi

Now that we have webservices running, we need to make changes to db, servers etc. so .. wondering if there are any patterns for handling planned and unplanned downtime using ServiceStack and also ...
0
votes
1answer
17 views

Web API calls with RestSharp - prepends application/json to body causing null parameter on action

I have a Web API service that I'm trying to access via the console using RestSharp. My RestSharp code looks like this: RestClient client = new RestClient(baseUrlString); ...
0
votes
1answer
41 views

Is this a CORS request?

I'm getting a CORS error with my WebAPI project but it's confusing me a little I'm doing an jquery ajax post from my website http://local.mysite.com to my web api site ...
0
votes
1answer
44 views

Dynamically change serialized datamember name in .NET WebAPI

I am using .NET WebAPI to build a custom API. What I am looking to do is dynamically change a properties datamember name at runtime. I understand that I can override the name by using the ...
-1
votes
1answer
20 views

Sample code or app whic demostrate to do autorisation agains DNN7 WebAPI

I start building my winforms app which uses DNN 7 as backend for authorization users. My users are registered and approved on DNN portal, an idea is to my new WinForms Application use same users as ...
0
votes
1answer
56 views

acessing username in web api controller when database table stores user as integer

Inside some web api controllers, I would like to access the User as indicated in this answer: http://stackoverflow.com/a/12705062/538962 sample code from answer... [Authorize] public ...
0
votes
1answer
32 views

ASP.NET Web API Exception filter - A way to get request url from HttpRequestBase?

I've implemented a custom exception filter to my Web API. It is working as intended, except for one small detail... In the following code sample, SaveToErrorLog saves exception details and tries to ...
0
votes
1answer
26 views

WebApi routing dependency using ASP.Net visual studio 2010

I'm creating a WepApi on visual studio 2010, I've use NuGet for the api. Now when I'm registering the API in the Global File im getting the following error. The code below is found in the ...
3
votes
2answers
77 views

ASP.NET MVC4 Web API Controller Stuck on One Route

I created a new ASP.NET MVC4 Web Api Project. In addition to the default ValuesController, I added another controller, ScenarioController. It has the exact same methods as ValuesController. But for ...
0
votes
1answer
18 views

Is there a way to represent summary rows with OData?

I'm trying to tack on additional information to the list of items returned from an ODataController's method. The use case is summary rows. So we basically want to return the rows of the report and ...
0
votes
2answers
33 views

calling my web api from jquery securely

I have a simple question that may point out to a complicated answer :( I have a web api which works fine. But now I want to set up Authentication/Authorization. I need it to work on all platforms, ...
0
votes
3answers
52 views

Asp.Net Web Api multiple get methods

I am trying to find the routing configuration for apicontroller having multiple get methods. The controller class has 3 methods: Public Function GetAllProducts() As IEnumerable(Of Product) Public ...
0
votes
0answers
28 views

ASP.NET WebApi Controllers in the external dll using MEF

I have simple ApiController in the separate project: <Export("Custom", GetType(ApiController)), PartCreationPolicy(CreationPolicy.NonShared)> Public Class CustomController Inherits ...
0
votes
0answers
16 views

OAuth from Windows Phone/ WinRT/ Xbox to Web-API?

I've got a site built with MVC 4 that uses DotNetOpenAuth to allow users to login via various OAuth enabled providers, as well as using a local security database. Once authenticated, regardless of the ...
1
vote
2answers
33 views

Document sniffing via Load<>?

I'm using RavenDb with ASP.NET Web Api and i've noticed, that it's possible to query other documents with the Load<Type> method. For example: public class Person { public string Id { get; ...
0
votes
1answer
38 views

Why doesn't my oData response have navigation properties

If you look at the following sample oData feed you'll see included navigation properties for 'child' items to tell you which URL to follow: ...

1 2 3 4 5 116
15 30 50 per page