routing

Asp.Net System.Web.Routing Find actual .aspx Page

I'm using System.Web.Routing to have some better URL's and have come across a problem. I need to know the actual page that's handling the request. for example a request comes in as: /basketball/home I need to find the page that handles that request, like: /management/default.aspx I'm only using the System.Web.Routing and not MVC...

ASP.Net MVC Controller Namespace array

I noticed that the MapRoute extension includes an overload that accepts a string[] parameter which is called 'namespaces'. I read what Google had for me on it, and supposedly this is to help the framework find controllers in places it wouldn't otherwise look. I did some spiking, and tried putting controllers in weird locations. I put o...

How do i construct a route without ViewContext in ASP.NET MVC?

I want to create a route from a utility class that doesn't have access to a ViewContext. Is this possible? There doesnt seem to be any equivalent of ViewContext.Current I've tried fishing around in all the constructors for Routing and HttpContext but can't quite get to what I want. This is what I'm looking for - although this doesn't ...

Simple Java web service router

How do I setup programmatic web service forwarding from my webapp to an external web service? I need something like tcpmon but then integrated into my webapp war so that my flash files can make web service calls back to the webapp that served them. These calls are, in turn, would be routed to the external web service. ESBs are too hea...

How do I set up a route for the home page of an ASP.NET MVC site?

I'm working with an ASP.NET MVC site which will use a CMS controller for all pages of the site except for the home page. Here's the idea: Home controller: www.site.com www.site.com/default.aspx CMS Controller: www.site.com/about www.site.com/agenda/schedule www.site.com/monkey/eats/spaghetti (pretty much anything else) This page...

ASP.NET MVC: Namespaces in routes

Hello! I have a small problem, I can't find any documentation on the namespaces parameter for MapRoute. Can anyone explain how I should use that? I want to map ~/Controllers/Projects/ProjectController.cs to this url ~/Projects/ but I also have other controllers in ~/Controllers/Projects that I want to map to other URL's. So I need to a...

SEO URLs with ASP.NET MVC

Is there a definite DO and DONT when implementing seo urls? A lot of good practise seems fine for .html sites but breaks down on medium/large database sites. AFAIK the url should be www.mysite.com/category/page-name-here If I wish to make a content rich site and be default the category and page are database driven - does this prevent ...

ASP.NET MVC

How to change default action method inside the ActionInvokeMethod of ControllerActionInvoker class? ...

ASP.NET MVC

Im adding one new route to RouteCollection like this routes.Add(new Route("{*data}", new MyRoutehandler())); now how to specify the controller name and action name inside this MyRouteHandler( my own route handler ) ...

ASP.NET MVC Dynamic Routing

How to change the default Action name inside the ProcessRequest(HttpContextBase) method.. ...

ProcessRequest(HttpContextBase) method.

How to change the default Action name inside the ProcessRequest(HttpContextBase) method.. ...

How can I implement Dynamic Routing with my choice of URL format?

My URL requirement is countryname/statename/cityname. For this I'm writing my own RouteHandler and adding one new route into the routecollection like this: routes.Add(new Route("{*data}", new RouteValueDictionary(new { controller = "Location", action = "GetLocations" ...

C# asp.net mvc 1.0 routing

In my web app. i want to setup a route like this: /document/quality/index /document/general/index /document/quality/detail/[id] /document/general/detail/[id] As you can see i have two kind of documents: general and quality. What is the best way to set this up in my global.asax file? I tried the following, but i don't get it work: ro...

ASP MVC Redirect without changing URL(routing)

Hello there, im having a little problem accomplishing this, hopefully someone can help me out. Currently using c#. Goal: I want to be able to type URL: www.mysite.com/NewYork OR www.mysite.com/name-of-business Depending on the string I want to route to different actions without changing the URL. So far i have: In: public static void...

Strange Rails Routing behaviour with nested resources

I have the following routing set up in my app (forms belong to a site): map.resources :sites do |site| site.resources :forms end However, when I try to go to a path for edit (or such) for a form using the helpers (e.g. edit_site_form_path(form) or <%= link_to 'Show', [:site, form] %> my URLs are coming out with the ID's swapp...

Can I store ASP.NET MVC routes in web.config?

I'm looking for a method of storing routing information in my web.config file in addition to the Global.asax class. The routes stored in the configuration file would need to take higher precedence than those added programmatically. I've done my searching, but the closest I can come up with is the RouteBuilder on Codeplex (http://www.cod...

asp.net routing with web forms--all routs get a 404

Hello I have created a web forms app that implements routing. My applications utilizes Phil Haack's example (http://haacked.com/archive/2008/03/11/using-routing-with-webforms.aspx). All of my routes receive a 404 error. Any ideas? Thanks ...

MVC w/ JavaScript - trips route

See the exception I have a JS include in my master page and it seems to be tripping one of the routes every time. Is tripping this route: routes.MapRoute( "CatalogType", "Catalog/{group}/{type}/{index}/{browseSize}", new { controller = "Catalog" , action = "Types" , group = "" , type = "" , index = "" , browseSiz...

How do I make this ASP.NET MVC Route for a twitter-style URL work?

Hi all, trying to map the following style of route: http://site.com/username in the same way that you can do http://www.twitter.com/user My initial solution was to have these routes: //site.com/rathboma - maps to user details for rathboma routes.MapRoute("Users", "{id}", new { controller = "Users", action = "Details" }); ...

ASP.NET MVC: Form Input to pretty URLs

I have a URL: Shipment/Search/{searchType}/{searchValue} and a controller action: // ShipmentSearchType is an enum ... PartNumber, CustomerOrder, etc... ActionResult Search(ShipmentSearchType searchType, string searchValue) So this means I can type in pretty urls like: Shipment/Search/PartNumber/Widget-01 And get a list of all the...