Questions about routing within ASP.NET Web API framework

learn more… | top users | synonyms

13
votes
1answer
338 views

Web api interface works locally but not on Azure

My case is very similar to this question, but since he did not get an answer I thought I'd throw some more input. Everything works fine locally (on the VS embedded server). When I deploy to Azure, I ...
4
votes
2answers
91 views

New WebApi Project doesn't have default routing for API (but still works)

I've created a new WebAPI MVC project, the API controllers have the path http://localhost:1234/api and they work from this route, but the RegisterRoutes class doesn't contain a default routing, it ...
3
votes
1answer
202 views

Web API nested routing not working as expected

I am having difficulty with a nested Web API routing set-up. Given a routing config of: config.Routes.MapHttpRoute( name: "UsersGroups", routeTemplate: ...
3
votes
5answers
212 views

Prevent Web API method from being called

I am working on creating a Web API using ASP.NET Web API. I'm currently stubbing out functionality on my endpoints so that I can then start developing against it. My WebApiConfig.cs file looks like ...
3
votes
1answer
229 views

ASP.NET WebAPI Supported Media Types per Method

Given a method in a controller: public class CustomerController : ApiController { [HttpGet] public CustomerDto GetById([FromUri] int id) { . . return customerDto ...
3
votes
1answer
470 views

How to modify framework's default Web API routes?

It seems there is a built-in default logic for Web API to use the HTTP Verb as the action name if no action was supplied in the URL. For example, I have this route: ...
3
votes
1answer
71 views

Can I set my WebAPI route to require that either parameter X or parameter Y is included?

For the GET function in my controller I want to require that a name be passed in. For the PUT function I want to require that the id be passed in (with the object in the message body). For example: ...
3
votes
0answers
179 views

Generating version specific help documentation pages for ASP.NET Web API application

I am using the WebAPI Versioning package to version my API by the X-Api-Header by using the "VersionHeaderVersionedControllerSelector". I am also using the Microsoft.AspNet.WebApi.HelpPage to ...
2
votes
2answers
54 views

Catch routing errors

I'm building a RESTful API and I would like to control all possible output to my consumers. I'm implementing an ExceptionFilterAttribute to filter all exceptions raised in my controllers. This, ...
2
votes
1answer
318 views

The inner handler has not been assigned using WebApi Delegating handler

I have got a problem with WebApi throwing an exception here in my code: public class WebApiAuthenticationHandler : DelegatingHandler { private const string AuthToken = "AUTH-TOKEN"; ...
2
votes
2answers
40 views

Multiple view for multiple devices in ASP .Net MVC

What can be the best way for architecting an ASP .Net MVC project, which have common web service part and multiple views for multiple devices. I have started with a JQuery mobile project, and have ...
2
votes
2answers
53 views

Is there a way to tell routing that my default action name is equal to the HTTP Action Verb?

I've looked through this document on MSDN and can't come up with the answer. Considering that I have a route defined like this: config.Routes.MapHttpRoute( name: ...
2
votes
1answer
54 views

Is it possible to route to an action with params in Web API .net?

is it possible to route to action? [HttpGet] public List<Product> GET(int CategoryId, string option, params string[] properties) { List<Product> result = new ...
2
votes
2answers
901 views

How to ignore a route in MVC4 WebAPI configuration?

I have an MVC4 project with elmah added. My global.asax's Application_Start() has WebApiConfig.Register(GlobalConfiguration.Configuration); // #1 ...
2
votes
1answer
117 views

Routing of file-like names in Asp.NET WebApi

Is it possible to add a route in the ASP.NET Web API routing configuration that allows handling URLs that look a bit like file names? I tried adding the following entry in WebApiConfig.Register(), ...

1 2 3 4 5
15 30 50 per page