0
votes
1answer
24 views

WebAPI returning UnAuthorized if missing Header Value

Using APS.NET MVC 4 WebApi Each request must have a Header called "version" if it doesn't or the version is too low, I need to return an UnAuthorized value to the client. I'm not sure how to send ...
2
votes
2answers
368 views

How do you return a custom 503 message?

I have a service implemented in MVC4 / ASP.NET Web Api. I would like to return a custom 503 message to my clients when the system is down for maintenance. I have the following code: public ...
1
vote
1answer
95 views

How to return deep serialized object (with complex type properties) in Asp.Net web api?

I have next classes: public class Event { public int Id { get; set; } public string Title { get; set; } public string Description { get; set; } public List<ImageLink> Images { get; ...
1
vote
3answers
227 views

.net web api updating model on PUT

So I'm trying to update a model. Here's how my models are set up: public class Event{ public int Id {get;set;} public string Name {get;set;} public DateTime Date {get;set;} public int ...
0
votes
1answer
242 views

Cant use FirstDispositionNameOrDefault after asp.net mvc4 WebApi beta Upgrade

I have just upgraded from WebApi beta to the latest WebApi packages from NuGet. The visual studio project I am using targets .NET 4.0 and not 4.5. I have been able to resolve all issues but one. I am ...
0
votes
1answer
72 views

Unable to throw httpResponseException

When I try to throw the below forbidden ResponseException from my controller. An exception stating "Processing of the HTTP request resulted in an exception. Please see the HTTP response returned by ...
0
votes
1answer
156 views

Web API without using ApiController

I'd like to use new MS Web API without having to inherit from ApiController Ideally I'd like to create separate classes that handle only one HTTP Method and Route. For example: // Handles GET ...
0
votes
1answer
331 views

asp.net mvc 3 upload file maximum size

I am trying to upload large files using ASP .Net Web API controller I am able to upload until 2 GB. But for more than 2GB I am unable to upload. is this a limitation of Web api controller and asp ...
21
votes
6answers
12k views

Single controller with multiple GET methods in ASP.NET Web API

In WCF Web API I had a class of similar structure: public class SomeController : ApiController { [WebGet(UriTemplate = "{itemSource}/Items")] public SomeValue GetItems(CustomParam parameter) ...
9
votes
2answers
2k views

how to set up elmah with aspnet mvc 4 web api

I've tried many elmah nuggets but they didn't work with aspnet mvc 4 web api. Does anybody knows why? Is there any work around for that? Thanks
0
votes
0answers
40 views

How easy it would be for an asp.net web api running in mvc to be invoked externally?

I checked the answer provided in mvc-4-vs-wcf-web-api For the answer given, the WebApi does not use SOAP, it does not require a WSDL, and does not export one. You can use Hypermedia to return ...
8
votes
3answers
2k views

Unable to authenticate to ASP.NET Web Api service with HttpClient

I have an ASP.NET Web API service that runs on a web server with Windows Authentication enabled. I have a client site built on MVC4 that runs in a different site on the same web server that uses the ...
0
votes
1answer
171 views

Convert MVC WebAPI controller to WCF service

I have to replicate a MVC4 WebAPI application but mine will just echo the data being sent to it, so I'm wondering if I should just go with a simpler WCF service, because MVC4 WebAPI application has ...
19
votes
4answers
7k views

ASP.NET Web API binding with ninject

I have just installed the mvc4 rc update and I am trying to build an api application with little luck. I am using ninject but cant get my controllers to load. I keep getting an error Type ...
1
vote
3answers
170 views

ASP.NET Web Api Routing Customization

I have WebApi controllers that end with the "Api" suffix in their names (For ex: StudentsApiController, InstructorsApiController). I do this to easily differentiate my MVC controllers from WebApi ...

1 2 3 4
15 30 50 per page