I mapped .aspx to .net (very shared-hosting friendly), then had a rule from /default.aspx to home/index.aspx
On Mon, Nov 24, 2008 at 4:32 PM, Colin Ramsay <[EMAIL PROTECTED]> wrote: > > I'm pretty sure that with the old routing I mapped everything to > *.html (as opposed to *.castle) and then had a rule like: > > /index.html > /home/index.html > > That allowed my homepage to look like http://www.mysite.com, i.e. with > no /index.html or /home/index.html when you hit the homepage. In that > case I definitely didn't map "*". > > On Mon, Nov 24, 2008 at 2:28 PM, Jimmy Shimizu <[EMAIL PROTECTED]> > wrote: > > > > Don't you need to map * as handler in order to use site-root routing? > > > > Colin Ramsay wrote: > >> Additionally on this, if I change my application extension to .aspx > >> then the Default.aspx will trigger a " Url smaller than 2 tokens" > >> exception. I guess this is because of the following code in > >> OnBeginRequest in RoutingModuleEx: > >> > >> if (File.Exists(request.PhysicalPath)) > >> { > >> return; // Possibly requesting a static file, so we skip routing > altogether > >> } > >> > >> On Sun, Nov 23, 2008 at 4:34 PM, Colin Ramsay <[EMAIL PROTECTED]> > wrote: > >> > >>> I'm still working on this documentation as I think it's useful to have > >>> something down even if it's going to change in future. I'm looking at > >>> the default rule: > >>> > >>> rules.Add( > >>> new PatternRoute("/") > >>> .DefaultForController().Is("staticcontent") > >>> .DefaultForAction().Is("home") > >>> ); > >>> > >>> Obviously this should match thusly: > >>> > >>> [TestMethod] > >>> public void Root() > >>> { > >>> RoutingRules.Register(RoutingModuleEx.Engine); > >>> > >>> RouteMatch match = RoutingModuleEx.Engine.FindMatch("/", > >>> CreateGetContext()); > >>> > >>> Assert.IsNotNull(match); > >>> Assert.AreEqual("staticcontent", match.Parameters["controller"]); > >>> Assert.AreEqual("home", match.Parameters["action"]); > >>> } > >>> > >>> The trouble is that when I'm running through IIS I cannot get this to > >>> match. If I do not have a Default.aspx placeholder, I get a directory > >>> listing. If I have a Default.aspx then I see the contents of > >>> Default.aspx. Incidentally the extension i'm using for my application > >>> is .ashx at the moment. > >>> > >>> On Wed, Nov 19, 2008 at 9:49 PM, Colin Ramsay <[EMAIL PROTECTED]> > wrote: > >>> > >>>> I think it would definitely be of benefit to try and state the problem > >>>> to provide context to the rest of the documentation, if nothing else, > >>>> and if that helps define a better solution then that's a good side > >>>> benefit. > >>>> > >>>> On Wed, Nov 19, 2008 at 8:44 PM, hammett <[EMAIL PROTECTED]> wrote: > >>>> > >>>>> Given the fact that I've been writing specs for the last 3 months, I > >>>>> wonder if we should try this for the routing stuff. > >>>>> > >>>>> The spec - at least on devdiv - is a definition of behavior, public > >>>>> API, consideration and issues. It is also used to create the > >>>>> documentation. Would that lead to waterfalling a supposedly agile > >>>>> environment? I'm not sure. What I know is that I've spent many hours > >>>>> writing and refactoring the routing stuff without a clear and > >>>>> agreeable definition of the whole problem space. > >>>>> > >>>>> Thoughts? > >>>>> > >>>>> > >>>>> On Wed, Nov 19, 2008 at 5:54 AM, Colin Ramsay <[EMAIL PROTECTED]> > wrote: > >>>>> > >>>>> -- > >>>>> Cheers, > >>>>> hammett > >>>>> http://hammett.castleproject.org/ > >>>>> > >>>>> > >> > >> > > >> > > > > > > > > > > > -- Ken Egozi. http://www.kenegozi.com/blog http://www.delver.com http://www.musicglue.com http://www.castleproject.org http://www.gotfriends.co.il --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Castle Project Users" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/castle-project-users?hl=en -~----------~----~----~----~------~----~------~--~---
