tagged [asp.net-mvc-routing]
ASP.NET MVC routing with one mandatory parameter and one optional parameter?
ASP.NET MVC routing with one mandatory parameter and one optional parameter? I've been working on a large MVC application over the past month or so, but this is the first time I've ever needed to defi...
- Modified
- 23 May at 11:47
Return either xml or json from MVC web api based on request
Return either xml or json from MVC web api based on request Given the following webapiconfig; and this controller; ``` public class ProductsController : ApiController { Product[] _products =
- Modified
- 27 May at 18:48
Multiple routes assigned to one method, how to determine which route was called?
Multiple routes assigned to one method, how to determine which route was called? I am working on a small ASP.NET MVC project at the moment. The project was released a few month ago. But changes should...
- Modified
- 16 Aug at 21:21
Web Api Optional Parameters in the middle with attribute routing
Web Api Optional Parameters in the middle with attribute routing So I'm testing some of my routing out with `Postman` and I can't seem to get this call to go through: ``` [RoutePrefix("api/Employees")...
- Modified
- 2 Aug at 20:28
ASP.NET MVC - Routing - an action with file extension
ASP.NET MVC - Routing - an action with file extension is there a way to achieve calling URL `http://mywebsite/myarea/mycontroller/myaction.xml` This would basically "fake" requesting a file but the re...
- Modified
- 3 Mar at 23:2
Upgrade to WebApi.Core error - A direct route cannot use the parameter 'controller'
Upgrade to WebApi.Core error - A direct route cannot use the parameter 'controller' I have been forced to upgrade Microsoft.AspNet.WebApi.Client and Microsoft.AspNet.WebApi.Core from version 5.0.0.0 t...
- Modified
- 12 Aug at 09:11
Ignoring a route in ASP.NET MVC
Ignoring a route in ASP.NET MVC I am just learning to work with routing in [ASP.NET MVC](http://en.wikipedia.org/wiki/ASP.NET_MVC_Framework) and am trying to understand the IgnoreRoute method. I am tr...
- Modified
- 4 Aug at 23:45
ASP.Net MVC RouteData and arrays
ASP.Net MVC RouteData and arrays If I have an Action like this: I can hit it with the following URL: But in my ViewPage, I have this code: ```
- Modified
- 18 Nov at 00:15
How to ignore current route values when generating links?
How to ignore current route values when generating links? The question is similar to [asp.net mvc Html.ActionLink() keeping route value I don't want](https://stackoverflow.com/questions/780643/asp-net...
- Modified
- 23 May at 11:44
Can periods be used in Asp.Net Web Api Routes?
Can periods be used in Asp.Net Web Api Routes? I'm working on moving an API project from raw http handlers where I'm using periods in the paths: I would like to follow the same URL schema in a Web Api...
- Modified
- 16 Jul at 18:5
ASP.NET MVC Url.Action and route name value
ASP.NET MVC Url.Action and route name value I am using asp.net mvc 2 and create localization based on routes. 1. my route looks like: {culture}/{controller}/{action} 2. I go to my home controller: en/...
- Modified
- 29 Oct at 11:17
How can I exclude a controller from ASP.NET Core 3 Attribute Routing
How can I exclude a controller from ASP.NET Core 3 Attribute Routing I am using ASP.NET Core 3.1 for my web API. I have multiple controllers all using attribute-based routing and all is well. We want ...
- Modified
- 20 Apr at 14:20
ASP.NET CORE, Web API: No route matches the supplied values
ASP.NET CORE, Web API: No route matches the supplied values Original Question: --- i have some problems with the routing in asp.net core (web api). I have this Controller (simplified): ``` [ApiVersion...
- Modified
- 11 May at 21:20
Why CSS and JS files bypass Asp.Net MVC routes?
Why CSS and JS files bypass Asp.Net MVC routes? I received a prototype application built with Asp.Net MVC4. It is currently replacing the default controller factory with a custom one using NInject, Se...
- Modified
- 15 Jul at 14:8
ServiceStack web.config settings ignored when using custom path
ServiceStack web.config settings ignored when using custom path ## Introduction My ServiceStack service handles route parameters that often contain periods ie: `/people/search/b.j./upton`. Initially, ...
- Modified
- 5 Aug at 17:26
How can I get controller type and action info from a url or from route data?
How can I get controller type and action info from a url or from route data? How can I get the controller action (method) and controller type that will be called, given the `System.Web.Routing.RouteDa...
- Modified
- 22 Apr at 17:49
controller path not found for static images? asp.net mvc routing issue?
controller path not found for static images? asp.net mvc routing issue? I have an image folder stored at ~/Content/Images/ I am loading these images via Recently, the images aren't loading and I am ge...
- Modified
- 25 Mar at 04:26
Ensure that HttpConfiguration.EnsureInitialized()
Ensure that HttpConfiguration.EnsureInitialized() I've installed Visual Studio 2013 and when I run my app I get the error below. I've got no idea as to where I'm to initialized this object. What to do...
- Modified
- 27 Jun at 02:55
What's the WebApi [FromUri] equivalent in ASP.NET MVC?
What's the WebApi [FromUri] equivalent in ASP.NET MVC? In WebApi I can decorate a parameter on a controller action with `[FromUri]` to have the components of the URI 'deserialized', if you will, into ...
- Modified
- 22 Feb at 10:51
Asp.net MVC Catchall Routing in a Sub Application
Asp.net MVC Catchall Routing in a Sub Application I have an MVC application with a sub application running another MVC project in IIS. Both use the same version framework and run on separate applicati...
- Modified
- 21 Sep at 12:36
Change route collection of MVC6 after startup
Change route collection of MVC6 after startup In MVC-5 I could edit the `routetable` after initial startup by accessing `RouteTable.Routes`. I wish to do the same in MVC-6 so I can add/delete routes d...
- Modified
- 27 Jan at 14:34
ASP.NET MVC Controller Unit Testing - Problem with UrlHelper Extension
ASP.NET MVC Controller Unit Testing - Problem with UrlHelper Extension Trying to do some unit-testing in my ASP.NET MVC 3 web application. My test goes like this: ``` [TestMethod] public void Ensure_C...
- Modified
- 10 May at 00:41
HTTP Error 403.14 - Forbidden - MVC 4 with IIS Express
HTTP Error 403.14 - Forbidden - MVC 4 with IIS Express This seems like a question that has already been asked/answered many times. Its not. VS 2012 and MVC 4. I am using the built in IIS Express to ru...
- Modified
- 11 Feb at 06:45
ASP.NET MVC URL generation performance
ASP.NET MVC URL generation performance A little benchmark with ASP.NET MVC. Viewpage code: ``` public string Bechmark(Func url) { var s = new Stopwatch(); var n = 1000; s.Reset(); s....
- Modified
- 20 Jun at 09:12
ASP.NET MVC ambiguous action methods
ASP.NET MVC ambiguous action methods I have two action methods that are conflicting. Basically, I want to be able to get to the same view using two different routes, either by an item's ID or by the i...
- Modified
- 25 Jun at 20:19