asp.net-routing

Using ASP.Net 3.5 SP1 Routing with SharePoint 2007

I'm trying to setup some friendly URLs on a SharePoint website. I know that I can do the ASP.Net 2.0 friendly URLs using RewritePath, but I was wondering if it was possible to make use of the System.Web.Routing that comes with ASP.NET 3.5 SP1. I think I've figured out how to get my route table loaded, but I'm not clear on what method t...

Public method for every view? Default ActionResult and Routes in ASP.MVC

Hi, I'm experimenting with ASP.NET MVC and Routes. It appears MVC forces me to add a public method to the controller any time I want to create a view. For example: public class HomeController : Controller { public ActionResult Index() { return View(); } public ActionResult About() { return View()...

Web Form Routing - Cannot create an abstract class.

Hi I am using ASP.Net 3.5 SP1 and attempting to implement a sample copy of http://haacked.com/archive/2008/03/11/using-routing-with-webforms.aspx into a sample web application however I seem to be having some issues. I am running windows vista, IIS 7.0, integrated-mode. Below is the YSOD: Cannot create an abstract class. Descr...

A word that do so the ASP.NET (MVC) Routing crashes

I read about a string/word that did so the Routing crashed but I can't remember which word/string combination it was. Example: http://stackoverflow.com/questions/685039/microsoft-logging-application-block-and-multi-threading - works http://stackoverflow.com/questions/685039/hello - works http://stackoverflow.com/questions/...

ASP.NET routing on IIS 6

I have created a basic site using ASP.NET routing according to Mike Ormond's example "Using ASP.NET routing Independent of MVC". This works fine on my local machine running the built-in web server. However, when I deploy it to my server (Windows Server 2003, IIS 6, ASP.NET 3.5 SP1) it just shows a 404 error. I have read somewhere that ...

Asp.net Routing, WebServices, and IIS7 Classic

I have a web forms app running on IIS7 Classic. It utilizes .asmx style web services for a client side heavy portion of the site. We have been tasked with layering in "friendly urls" and decided to use the new Asp.net routing. We have a rule in IIS to map all requests to the aspnet_isapi.dll, which yields this declaration in our web.c...

Asp.net 3.5 Sp1 Sub-Domain routing ?

I was wondering is there is a way to introduce sub-domains in Asp.net 3.5 routing All i found as this http://blogs.securancy.com/post/ASPNET-MVC-Subdomain-Routing.aspx But i was looking for something more complex to allow doing wild-card sub-domains Any Help ? ...

system.web.routing on a web server not working

I have read all these articles about how to make system.web.routing work but all these articles explains on localhost:port. I can get this working on the local machine, but as soon as I upload the site on the server, the Routing stops working no matter what I do. First I was trying without any extension (.aspx) but after all efforts I ...

How does asp.net mvc figure it out?

How is it that I can create a method in the controller and just put some arguments and it figures it out after I click on a form submit? Under the hood, how does it find the right method and how does it figure out that I just want those arguments? ...

ASP.NET MVC, Url Routing: Maximum Path (URL) Length

The Scenario I have an application where we took the good old query string URL structure: ?x=1&y=2&z=3&a=4&b=5&c=6 and changed it into a path structure: /x/1/y/2/z/3/a/4/b/5/c/6 We're using ASP.NET MVC and (naturally) ASP.NET routing. The Problem The problem is that our parameters are dynamic, and there is (theoretically) no lim...

Ignoring a route in ASP.NET MVC results in a 200 not a 404

We have URLs of the form http://site/controller.mvc/action If we accidentally write a relative URL for an image into the html (say src="imgs/img1.gif") this results in the browser making a request to: http://site/controller.mvc/action/imgs/img1.gif Which gets routed through to the controller but then cannot resolve to an action me...

Route with check for File exists and levels

For example, I have two folders: common and specific. They have identical structure and could have the same pages. files: /common/default.aspx /specific/default.aspx url: http://domain.com/default.aspx I wonna tune asp.net routes, with a rule if searched page exists in specific than used it, if there is no such page, load from common....

ASP.NET url routing, default path

Hi, I expected this would also map the default homepage as in http://localhost/ but it is not hit. RouteTable.Routes.Add(new Route("{Keyword}", new HomeHandler())); Question is of course why not? I would like to map the root to some other page. ...

ASP.NET MVC: Routing hierarchy URL

How can I make routing for this? URL: /category/main/sub/ or /category/main/sub1/subsub/ I want to have /main/sub/ and /main/sub1/subsub/ as parameters in Index action method of CategoryController. ...

Would it be possible to use URL routing for the following purpose?

I have a site that is being converted from classic asp to asp.net webforms. The old version of the website maintained to separate versions of the site, one for the US and one for Canada. The US version sat at the root of the domain and the Canadian version sat inside a folder named "canada". The new asp.net version of the application, ...

ASP.NET URL Routing on root in IIS 6.0

Hi All, I enabled a routing on ASP.NET web application running IIS 6.0 using RouteTable.Routes.MapPageRoute("Simple", "{testvalue}", "~/Test.aspx"); in Global.aspx.cs This works fine when I use http://www.MyDomain.com/Hello, however when I use http://subdomain.mydomain.com instead of loading the configured default page (default.aspx),...

ASP.NET MVC Hierarchy Url Routing

Hello, I have a problem My route have an extra paramater after hierarchical category. /2009/World/Asia/08/12/bla-bla-bla asp.net mvc does not support this because my routing should be {year}/{*category}/{month}/{day}/{name} i tried use constraint like year = @"(\d{4})",category = @"((.+)/)+", month = @"(\d{2})", day = @"(...

ASP.NET Routing (3.5) - How to handle multiple TLD domains?

Is it possible to have one asp.net web application that handles requests from two domains via asp.net routing? I need one TLD domain per language version pointing to the same app. How to set up a route that recognize, if the request is coming from domain1.de or domain2.com? How to configure the domains DNS for this to work? Thanks i...

Empty query string parameters with ASP.NET MVC

Is it possible to add "empty" query string parameters with ASP.NET MVC? I need to somehow generate the following url using Html.ActionLink: /Home/Index?foo However this Html.ActionLink("Index", "Index", new {foo = ""}) will output /Home/Index Is this possible at all? ...

Advanced ASP Routing tutorials and examples

The one of major hurdles I seem to be having recently is getting my head around some of the more complex routing requirements for some MVC based applications I've been developing. I'm having problems finding the right set of tutorials to walk me through it to get a complete understanding. What I'd like to find is a complete set of tutor...