37,950 questions
0
votes
2
answers
129
views
Custom constraint in EF fails, async issue
I have a controller action like this (ASP.NET web api)
public HttpResponseMessage<Component> Post(Component c)
{
//Don't allow equal setup ids in within the same installation when the ...
2
votes
1
answer
3k
views
When HTTP-POST has body, url parameter is null
This is self-hosted RESTful MVC4 Web API, the only route is api/{controller}/{state}. When I send an HTTP-POST that has a body, the state argument comes in null. If I remove the body the state ...
0
votes
1
answer
463
views
How to deserialize the request body AsSingleObject while also passing parameters from the route?
I have a pretty standard route like this, {controller}/{action}/{id}, where id is optional.
Consider these three PUT actions:
public void DoSimpleStuff(int id) {/*DoingStuff*/ }
public void ...
4
votes
1
answer
1k
views
How can I extend the content negotiation behavior in MVC4?
I'm working through a RESTful API design, and one of the questions I have about content negotiation I've posted to the Programmers StackExchange site here.
Based on that, I'm interested in how I ...
301
votes
5
answers
90k
views
ServiceStack vs ASP.Net Web API [closed]
I want to write a new REST style API and have looked at ServiceStack and quite like it. However, I have seen that Microsoft has released the ASP.Net Web API project as part of the new MVC 4 beta. Has ...
0
votes
2
answers
261
views
How do I access my own API from my MVC site?
here's my setup:
I have an MVC3 site hosted with a www subdomain (e.g., www.example.com). My site is secured via SSL and forms authentication, backed by ASP.NET membership/role providers. I have ...
20
votes
3
answers
19k
views
WebAPI Controller is not being reached on DELETE command
I am having difficulty getting the DELETE Method on my Controller to fire when submitting the request over ASP.NET Web API. It returns a 404 but I cannot figure out why. The GET & POST requests ...
2
votes
2
answers
5k
views
Deploying ASP.NET MVC 4 Web API
Problem deploying ASP.NET MVC 4 Web API
I try to deploy an ASP.NET MVC 4 Web API site. Everything work fine but if I call the server from the outside and return the HTTP status of 400 and upwards, ...
2
votes
1
answer
732
views
Differences in content negotiation between collections and single values in MVC 4?
I'm leveraging the new MVC4 ApiController to build out a search interface; something like this:
public IEnumerable<RecordSummaryType> Get( ... )
{
var list = MyService.GiveMeTheList( ... );
...
0
votes
2
answers
275
views
ASP.NET Web API in asp net
Does any one know is is possible to use ASP.NET Web API in ASP .NET not in Asp MVC ?
0
votes
2
answers
2k
views
Web API Request - Send back authentication request
I am using the new MVC 4 Beta Web API. I want to add an [Authorize] attribute to the Get action in order to have the user authenticate themselves before getting data from the server. I am using ...
1
vote
1
answer
890
views
How to get single entity with upshot
Stack:
ASP MVC4 Beta
Web API
Knockout.js
Upshot.js
I have a master-detail scenario. In the master part, I'm editing a Order and on the details part i have the orders products. I can list all the ...
3
votes
3
answers
5k
views
Change name of inner objects for ASP .NET MVC 4 WebAPI serialization (XML/JSON)
I am building a RESTful Web Service with the new Microsoft MVC 4 ApiController class and WebAPI.
I have a Person class:
public class Person
{
public string surname { get; set; }
public string ...
6
votes
1
answer
4k
views
Does ASP.NET Web API (beta) run with the latest Mono (stable)?
I'm trying to get the new ASP.NET Web API beta (VS 2010 default Web API project) running on Ubuntu 10.04 with Mono 2.10.8.1. Unfortunately I failed miserably in all my attempts so far. The most "...
5
votes
2
answers
2k
views
Microsoft ASP .NET Web API, MVC 4 and SPA Architecture
Microsoft recently released MVC 4 Beta, which has these new very nice features like Web API and SPA. And as always Microsoft's demos do not demonstrate best practices from software design prospective. ...
1
vote
1
answer
634
views
What is the most efficient way to send OData payloads over the wire? "Dense JSON?"
I'm designing a distributed application that will consist of a variety of REST services. Lately I've been going back and forth about whether to implement my REST services using the ASP.NET MVC 4 Web ...
6
votes
1
answer
3k
views
relay WebHttpRelayBinding to webapi service
I have a desktop webapi server that I want to expose to clients through azure service bus's relay WebHttpRelayBinding is there a simple way to capture all the messages from the service bus and pass ...
2
votes
1
answer
842
views
ASP.NET Web Api metadata exchange?
Does anyone knows if there is any way to expose the new ASP.NET WEB Api REST interface metadata as with WCF (/help)?
<standardEndpoints>
<webHttpEndpoint>
<...
36
votes
4
answers
16k
views
Nested resources in ASP.net MVC 4 WebApi
Is there a better way in the new ASP.net MVC 4 WebApi to handle nested resources than setting up a special route for each one? (similar to here: ASP.Net MVC support for Nested Resources? - this was ...
5
votes
1
answer
4k
views
Deserialization / model binding in MVC4 webapi does not work with arrays
I'm using the new WebApi which is part of MVC4 beta. I have the following class:
public class Voucher
{
public string Id { get; set; }
public string TableId { get; set; }
public Product[] ...
2
votes
4
answers
3k
views
ASP.NET MVC4 Web API MediaTypeFormatter Converter to convert XElement to JSON
I am building an API in ASP.NET MVC4 Web API, and one of my actions returns XML (currently in the form of an XElement). I have no control of the data, I am just passing it on. There is no standard ...
24
votes
9
answers
23k
views
ASP.NET Web API Self-Host with Windows Authentication
I am trying to use the ASP.NET Web API Self-Host option with Windows authentication so I can determine the logged on user and ultimately accept or reject the user based on their identity. Here is my ...
117
votes
8
answers
185k
views
Custom method names in ASP.NET Web API
I'm converting from the WCF Web API to the new ASP.NET MVC 4 Web API. I have a UsersController, and I want to have a method named Authenticate. I see examples of how to do GetAll, GetOne, Post, and ...
2
votes
1
answer
247
views
WCF REST - Myriad of ways to create - How to choose?
I am learning to create RESTful services using WCF. There are a myriad of options to choose from. I am confused as to what should i use.
1.)REST Starter kit - Seems to be obsolete
2.)WCF WEbhttp ...
9
votes
6
answers
10k
views
Castle Windsor ApiController Factory implementation for ASP.NET Web API
I know it's possible to use DependencyResolver and register Castle Windsor with MVC but due to the issues described in https://stackoverflow.com/a/4889222/139392 we have stuck to the ...