Skip to main content
Filter by
Sorted by
Tagged with
5 votes
1 answer
4k views

I need a bit of help implementing an OAuth 2 provider for a rest service built on the new ASP.NET Web API. I'm aware there are some similar questions on Stack Overflow but they're more or less links ...
Mark's user avatar
  • 21.7k
2 votes
1 answer
2k views

I want to make sure that I am using ContinueWhenAll appropriately. I have a number of calls which will run asynch and then I want to complete to a final task only after the other tasks have completed ...
AlexGad's user avatar
  • 6,702
6 votes
1 answer
5k views

i´m trying to use the asp.net web api in WEB FORMS with visual studio 2010 (sp1) i have done this steps http://myrandomykien.blogspot.com/2012/02/simplest-web-api-site-with-nuget.html When i use the ...
sebacipo's user avatar
  • 810
84 votes
11 answers
100k views

Has anyone had any success running using an IoC container to inject dependencies into ASP.NET WebAPI controllers? I cannot seem to get it to work. This is what I'm doing now. In my global.ascx.cs: ...
Oved D's user avatar
  • 7,472
2 votes
2 answers
3k views

I'm creating a web API based on the new ASP.NET Web API. I'm trying to understand the best way to handle people submitting multiple data-sets at the same time. If they have 100,000 requests it would ...
Hairgami_Master's user avatar
1 vote
2 answers
1k views

How do I use UriPathExtensionMapping in MVC4? I've added the mapping in the formatter such that: MediaTypeMappings.Add(new UriPathExtensionMapping("json", new MediaTypeHeaderValue("application/json")...
Tyst's user avatar
  • 871
6 votes
1 answer
3k views

I'm playing around with the WebAPI beta, and it seems that selects have no effect on the response of an action returning an IQueryable. Eg: http://localhost:62689/api/product?$select=Id,Name ...
Sir Code-A-Lot's user avatar
24 votes
6 answers
11k views

I'm going to be working on a project that involves a number of elements: ASP.NET MVC website C# console application iPhone App To get all these separate applications talking to the database, my ...
Dan's user avatar
  • 5,697
2 votes
1 answer
2k views

I'm struggling with getting a custom attribute / filter working with ninject, constructor injection on the ASP.NET Web API. Here's a few snippets to give some context... //controller [ApiAuthorise] ...
Matt F's user avatar
  • 384
202 votes
20 answers
337k views

In Web API I had a class of similar structure: public class SomeController : ApiController { [WebGet(UriTemplate = "{itemSource}/Items")] public SomeValue GetItems(CustomParam parameter) { ......
paulius_l's user avatar
  • 5,003
410 votes
9 answers
325k views

I've been playing around with ASP.NET MVC 4 beta and I see two types of controllers now: ApiController and Controller. I'm little confused at what situations I can choose a particular controller. ...
VJAI's user avatar
  • 32.9k
1 vote
2 answers
3k views

I'm trying out the API controller in MVC 4 and have a question about best practice when using put, updating an object. I'm using RavenDB as data storage and I have created a custom MediaTypeFormatter ...
marcus's user avatar
  • 10.2k
3 votes
5 answers
11k views

I've got a legacy web service which I'd like to wrap with a new MVC Web API, question is can I get the ASP.NET Web API to convert my xml into json? A thought that I had was to use XDocument to create ...
nieve's user avatar
  • 5,157
14 votes
2 answers
22k views

I am trying to implement a custom authorization attribute on my Web API controllers, but came across an unexpected behavior. <Authorize(Users:="myUser")> Public Function GetTodoItems()...
Szilard Muzsi's user avatar
8 votes
2 answers
6k views

Since last few months this Asp.Net Web API seems to be an highlighted product from Microsoft. Is it an alternative to WS* Service. How is it different than WCF Service? And where can we see it as a ...
Saurabh's user avatar
  • 306
40 votes
7 answers
35k views

I've done a bit of work in the past using WCF WebAPI and really liked a lot of its features, I'm just playing with ASP.NET Web API at the moment and it seems completely different (IE completely ...
undefined's user avatar
  • 34.4k
93 votes
17 answers
177k views

I have a bit of a weird problem. I developed an app with MVC 4 and the new Web API and it works fine locally. I installed MVC4 on the server and deployed the app. Now I get the following error: Could ...
Remy's user avatar
  • 12.8k
5 votes
1 answer
6k views

I noticed when the MVC4 beta was announced, it includes a new "Web-API". (MVC 4 announcement) In what circumstances should I use this Web-API instead of a normal HTTP/WCF Web-service? What problem is ...
NathanS's user avatar
  • 110
3 votes
3 answers
8k views

In my code I have a base class Foo and all my objects inherits from the Foo object. So let's say I have a class like this public class Bar : Foo { public string Heading { get;set; } } I have ...
marcus's user avatar
  • 10.2k
1 vote
1 answer
2k views

I'm testing the new ApiController in asp.net mvc 4 beta but when I try to return an class that looks like the following only a few properties gets serialized? public class PageModel : IPageModel { ...
marcus's user avatar
  • 10.2k
14 votes
4 answers
26k views

When I post a json object with a date property to a ApiController it won't deserialize into a date. Server site code: public class MegaTestController : ApiController { // POST /megatest ...
Bjarki Heiðar's user avatar
12 votes
1 answer
3k views

I have found a minor difference in the routing base classes in ASP.NET Web Api which has forced me to write a little helper class which will allow me to define my routes just once. Is there a reason ...
Antony Scott's user avatar
  • 22.1k
9 votes
1 answer
6k views

Is this a bug in the framework? I have to use HttpUtility.UrlDecode here. I thought things were automatically decoded in MVC. public Thingy[] Get(string id) { var actualId = ...
Antony Scott's user avatar
  • 22.1k
33 votes
5 answers
16k views

With the standard MapRoute method a can pass a string collection representing the namespaces in which to search for my controller. This seems to have disappeared from MapHttpRoute. How does one define ...
jwanga's user avatar
  • 4,256
2 votes
1 answer
575 views

I am struggeling... Is it safe to start developing with MVC4 Web Api (BETA) in a project that will be released live 2012 Q2. I have heard that final version of MVC4 will be released 2012 Q3. Since I ...
Flatron's user avatar
  • 687