Questions about routing within ASP.NET (including MVC).

learn more… | top users | synonyms

0
votes
1answer
25 views

How to route MVC so that I can post a form with a model.action parameter?

Hopefully this is an easy one for somebody out there. I am trying to post a form to my MVC controller that happens to have an "action" property on the model. Unfortunately, the model.action is ...
0
votes
0answers
21 views

Clarify MVC Route Evaluation re: Action Selection

Some Backgound: I am getting a little pedantic about how MVC determines the proper action when selecting a route. The example is simple, but I am seeking specific clarity for my own benefit. ...
1
vote
0answers
14 views

Using Url.RouteUrl() with Route Names in an Area

As a side note, I understand the whole ambiguous controller names problem and have used namespacing to get my routes working, so I don't think that is an issue here. So far I have my project level ...
0
votes
1answer
39 views

MapRoutes not working

I can't see what is going wrong here. I have the more specific route on top but it just returns error 404 - not found. Doing /api/playernames/competitions works but ...
0
votes
1answer
20 views

How should I route CMS urls alongside optional paramters / actions in route config?

I'm trying to add a basic CMS to an MVC website that uses a "url-formatted-string" as an ID for the CMS item. I've spent many hours trying to meet the requirements set out below. But now I'm ...
0
votes
1answer
29 views

ASP.NET MVC 5 (Visual Studio 2013 Preview) Change Login Url for [Authorize]

Hey guys I started playing around with the ASP.NET MVC 5 preview and everything has been going fine so far (I can only recommend it). However, I wonder where I can set the Login-Url for the Built-In ...
0
votes
1answer
14 views

Html.ActionLink generates the wrong link based on routes.MapRoute

I guess I still don't understand routing. I have three controllers AdminController DashboardController ProjectGroupsController For Dashboard, I want the url to be /Dashboard/. For Admin ...
0
votes
1answer
21 views

How to modify MVC 4 Routing Table for Different Users?

I am fairly new to ASP to MVC, and I need help to setup routes. I am building a site that has two types of users (Seller & Buyers). Depending on which user logs in, I want the system to take them ...
0
votes
1answer
34 views

Does the SignalR RouteTable.Routes.MapHubs(); absolutely have to be put in Application_Start()?

Can it be put in other custom named methods within Global.asax that start up first like OnApplicationStarted()? The dilemma I'm having is that our project has a custom class that the class in ...
0
votes
1answer
41 views

C# MVC Custom Routing Design

With default route that is: routes.MapRoute( name: "Default", url: "{controller}/{action}/{category}", defaults: new { controller = "Home", action = "Index", ...
0
votes
1answer
12 views

default page issue with 4.0 ASP.NET and MVC mixed mode website

I am converting a classic ASP.NET 4.0 site to also use MVC. Over time I am migrating the ASP.NET code to MVC, but during the transition both technologies will be in use. If I navigate to the default ...
0
votes
1answer
16 views

MVC sending a View based on the browser, not mobile

I have a single form that I had created for up to date browsers, but have to also ensure I have a version that renders fine on an embedded IE6 (old call center), I'm looking for a way to tell MVC to ...
0
votes
2answers
37 views

Routing Reserved Words in ASP.Net

I have a legacy url that I wish to map to a route in my ASP.Net MVC application e.g. http://my.domain.com/article/?action=detail&item=22 Now in route creation action has a special meaning so my ...
0
votes
1answer
11 views

Default Routing Not working in .NET MVC 1 (and 2)

My default routes are very simple, but the page doesn't properly load without fully qualifying the entire route. Here are the routes I'm using: routes.MapRoute( "Default", // Route name ...
0
votes
1answer
26 views

Html editor not work asp.net 4.0

i have one task in that i have to add html editor for that i code like this. <asp:ToolkitScriptManager ID="ToolkitScriptManager1" runat="server"> </asp:ToolkitScriptManager> ...
0
votes
1answer
40 views

ASP.NET MVC 4 Web API fails to map path containing the string “con”?

What is so wrong about the string "con"? OK, my api route configuration is rather uninteresting: config.Routes.MapHttpRoute( name: "DefaultApi", routeTemplate: "api/{controller}/{id}", ...
2
votes
1answer
50 views

Multiple entity types using the same endpoint/controller

I'm using RavenDB in my application and by default the id to a document looks something like this: homes/1 where homes is the collection type name of the class Home. If I create a new class called ...
0
votes
0answers
13 views

Routing to an ASP.NET web service method?

We've got a jQuery widget which populates its contents from a cross-origin RESTful web service using JSONP. Unfortunately, due to various browser issues associated with HTTPS, JSONP and client ...
2
votes
1answer
36 views

ASP.NET MVC 4 Core routing

I have set up the following structure for my website. (see link below) http://postimg.org/image/ut4klihrp/ localhost:62540 Goes to the index page of the core localhost:62540/www/Home Goes to the ...
0
votes
3answers
28 views

how to remove Index action from Homecontroller

i've all the defaults in my Home controller as well as in routeconfig.cs. I'm trying the following : abc:111/ --> runs Index() method abc:111/Home --? runs Index() method abc:111/Home/Index ...
0
votes
2answers
30 views

MVC Ecommerce routing

I am trying to get my head around routing for MVC4 I want to create a URL structure consisting of BrandName / ProductType / PageNumber Sometimes it could just have Brand or just product type ...
0
votes
1answer
21 views

Asp.net specific Mvc Routing

My url is as follow: www.example/videos/category1,category2,category3/sex/hospital/doctor But in my url category1 and category2 and category3(may be 1 or too many) can be null/empty. Also sex or ...
1
vote
1answer
66 views

Comma in url shown as %2c%

I have question: My route is as follows: _routes.MapRoute( "VideoWithQualitySystem", "videolar/{category},{subject},{sicknes},{tags},{gender},{hospital},{medicalCenter},{doctors}", new ...
0
votes
1answer
58 views

Asp.net Mvc Routing. “*” meaning in route

In ASP.NET MVC routing I have seen "*" in routes: {Controller}/{Action},{*parameters} What does this mean?
0
votes
2answers
50 views

jQuery ajax - call various MVC controller actions

I have a controller (RequestsController) with several actions (all taking one parameter) For example: public List<Models.AcceptRequests> GetAllAcceptRequests(int passedId) public ...
0
votes
1answer
32 views

ASP.NET MVC routing with non standard controller name

I need url for editing friends in my ASP.NET MVC site like this: site.com/friend{x}/edit where {x} - id of friend. So, how should I use my ActionLinks, Controller name and Routings ?
0
votes
1answer
37 views

asp.net mvc4 url rewrite for seo

Url rewrite code to use to for asp.net MVC4; I use to App_Start/RouteConfig.cs in the code down. routes.MapRoute( name: "subjectSefLink", url: "{controller}/{seo}/{page}", defaults: new { ...
2
votes
0answers
72 views

MVC 4 Web Api Route 404 issue

I have a plain-vanilla MVC 4 Web Api project created using VS2012. The (/api/Values) works out-of-the-box on the localhost but NOT when deployed on IIS (packages created using the standard ...
0
votes
3answers
54 views

How do I set up an ASP.NET MVC route in which the controller name is derived from multiple segments of the URL?

I'm building a website which needs to map the following URLs to their respective controllers; van-insurance/quote1 maps to EditVehicleController van-insurance/quote2 maps to EditProposerController ...
0
votes
1answer
25 views

MVC multiple parameter routing

I've been trying to pull the parameters passed into a page so I can post it back in Context. So far, ViewBag.Message = string.Format("{0}::{1}::{2}", RouteData.Values["controller"], ...
0
votes
1answer
22 views

How to omit the AreaPath folders from MVC URL

I am developing an MVC4 app and want to omit the AreaPath FolderNames from the URL displayed to the end user Actual Path /Areapath/FolderName/ControllerName/Action/Index Currently the End user see ...
2
votes
1answer
46 views

Routing, matching a specific url if it contains a word

right now I have a map route that matches foreach(var subcat in Sports.Categories) { routes.MapRoute("MultiRoute" + i, subcat+"/{title}", new { controller = "Routing", action = "Redirect", category ...
1
vote
1answer
26 views

MVC Area View not found in deployed app. HTTP 404 Error

I’m hoping that someone can set me straight on an issue I have with MVC Areas. I know that this question has been asked before, but I am not able to see the error in my code. In an intranet app I ...
0
votes
1answer
28 views

MVC Route specific URL to specific action?

I would like to keep the regular routing of area/controller/action/id but have 1 extra url /login that goes to /account/account/login.(area named account, controller named account, action is login) ...
0
votes
2answers
43 views

How to control which Action is used in ASP.NET MVC

I have a setup where I use one route with url's on the following format: www.example.com/friendly-url-1 www.example.com/friendly-url-2 www.example.com/another-friendly-url The route is defined ...
0
votes
0answers
25 views

MVC Route Trouble

I have an application using MVC 4 and I need to add some new routes. When users access the aplication, they should access this way: application.name.com/something The "Something" in the url above ...
0
votes
0answers
30 views

Custom routing (long URL) in asp.net mvc

I have read the next manual: http://sharpercoder.blogspot.ru/2011/04/custom-routing-in-mvc.html But it didn't help me. I have a Controller, which already do some work. Now, it just accept some ...
1
vote
1answer
58 views

asp mvc routing by namespace, controller and action

I got an Asp Mvc 4 application. And I don't know how to register routes and use it in ActionLinks, RedirectToActions and so on in my solution. Solution ---Controllers ------Admin ...
-4
votes
1answer
46 views

MVC4 Routing With Folder and Sub Folder Names [closed]

We are Working on MVC4 and Finding it difficult to manage all the folders under view only. my controller structure is changes as below and i have also aligned my view accordingly ...
0
votes
1answer
80 views

How to create Ror style Restful routing in Asp.net MVC Web Api

How to configure routing in asp.net web api, to that I can code for the following actions in my ApiController inherited class? ...
1
vote
1answer
59 views

routing to MongoDB ObjectId via ServiceStack

I am developing a ServiceStack api and I am having trouble routing to: [BsonId] public ObjectId Id { get; set; } I've tried setting up a custom binding model as follows: public class ...
1
vote
2answers
37 views

Weird behaviour with routing in ASP MVC

I've been messing around a little with the RouteConfig class in MVC4 and I came across a weird behavior that I don't know why it's happening. I have the following code in the class: public static ...
1
vote
1answer
57 views

webapi how to route help page to home page

I have an ASP.NET-Web-API project with a generated help area. I would like to route the home page to be pointing to the help page. How can this be done? I've tried to modify the area registration like ...
4
votes
4answers
78 views

ASP.NET MVC 4 - Unique routes for Groups of users?

I'm building an appplication where I want to give a client company a unique url like 'clientcompany.app.com' or 'app.com/clientcompany'. When a user signs up I want to let them pick their subdomain, ...
0
votes
1answer
24 views

Routing in MVC3 - How can i call ReturnView() for a view in another folder?

i have a mvc3 project ( nopcommerce 2.65 ) with structure like this. Nop.Plugin.Payments.KrediKarti (namespace) --Controllers ----SecurePaymentReturnController.cs : : Nop.Web (other namespace) ...
0
votes
2answers
43 views

Asp.net MVC 4 admin Routing

I'm a kind of newbie with routing, I want to give the possibility to my user to go to the admin part of the site by just entering www.hisSite.com/admin whith a route that will redirect to the ...
2
votes
2answers
39 views

ASP.NET route with arbitrary number of key-value pairs - is it possible?

I'd like to handle URLs like this: /Id/Key1/Value1/Key2/Value2/Key3/Value3/ Right now, I have set up a rule like this: /{id}/{*parameters} The parameters object is passed as a single string to ...
2
votes
0answers
31 views

Routing based on data in database

I'm using Asp.Net MVC 4, and am unsure of the best way to approach a routing problem. The site needs to support static urls which are mapped to controller/actions in the usual way: /about /contact ...
0
votes
0answers
42 views

asp.net mvc route with action after id and slug

I'm adding a new route into my mvc web application and it's not working as desired. I was hoping someone could help me figure out where in the list it should go and maybe which defaults and/or ...
0
votes
1answer
19 views

Odd routing outcome with ASP.NET MVC 4?

I have the oddest routing problem that I cannot work out how to avoid. We have two areas in our application, and both of them have an Employees controller. So we have these two valid URLs: ...

1 2 3 4 5 41