Hi, I removed the "~" symbol from the returned value of CreateMonoRailPath(RouteMatch), like you suggested in the past thread. Unfortunately, I still do not get the application routing to work on mono + Linux.
Now I get resource not found exceptions for rules like this (with the routing rules like <community>/<controller>/<action>) and for the others that previously worked without the class changes. I get the error: ** *The resource cannot be found* *Description: *HTTP 404. The resource you are looking for (or one of its dependencies) could have been removed, had its name changed, or is temporarily unavailable. Please review the following URL and make sure that it is spelled correctly. *Resource URL: */home/index.rails It would be nice If you could send me the files with the changes. Thanks On Tue, Apr 28, 2009 at 10:45 PM, Ricardo Lopes <[email protected]> wrote: > > Hi, > > I had the same problem some time ago. > > I was able to fix the problems I had on mono with just a small changes > to the castle code (RoutingModuleEx and DefaultUrlBuilder). > > See: > > > http://groups.google.com/group/castle-project-devel/browse_thread/thread/dd3dcba67b0a4e26/a7776c77d0824e66?hl=en&lnk=gst#a7776c77d0824e66 > > The changes were only 2 or 3 lines and the changed classes works on > m...@linux and ....@windows. > > If you want I can send the files (I could swear that i uploaded them > to donjon but I couldn't find them, I will check this later...) > > Best Regards, > Ricardo Lopes. > > 2009/4/28 heike <[email protected]>: > > > > Hi, > > > > I am doing some tests on mono+linux and everything works fine for my > > application except for the new routing module. > > > > In the routing rules i define the area as empty but the monorail > > handler seems to be ignoring it. > > > > > > in the Web.config I have added the following: > > > > <httpModules> > > > > <add name="routing" > > > type="Castle.MonoRail.Framework.Routing.RoutingModuleEx,Castle.MonoRail.Framework"/ > >> > > > > </httpModules> > > > > In Global.asax I have added this rule for testing: > > > > > > private void Application_Start(object sender, EventArgs e) > > { > > > > > > RoutingModuleEx.Engine.Add(new > > PatternRoute("default","<community>/<controller>/ > > <action>.rails").DefaultForArea().IsEmpty.DefaultForController().Is > > ("Home"). > > DefaultForAction().Is("Index").DefaultFor("community").Is("1")); > > > > } > > > > When I try the url for that route i get a > > ControllerNotFoundException. > > > > http://localhost/1/home/index.rails > > > > Controller not found. Area: '1' Controller Name: 'home' > > > > Description: HTTP 500. Error processing request. > > > > Stack Trace: > > > > Castle.MonoRail.Framework.ControllerNotFoundException: Controller not > > found. Area: '1' Controller Name: 'home' > > at Castle.MonoRail.Framework.MonoRailHttpHandlerFactory > > +NotFoundHandler.ProcessRequest (System.Web.HttpContext context) > > [0x00000] > > at System.Web.HttpApplication+<Pipeline>c__Iterator2.MoveNext () > > [0x00000] > > at System.Web.HttpApplication.Tick () [0x00000] > > > > The same code works fine on Windows > > > > The only PatternRoutes that do something are such like: > > > > PatternRoute("default","<controller>/<action>.rails").DefaultForArea > > ().IsEmpty.DefaultForController().Is("Home").D > > efaultForAction().Is("Index")); > > > > (works with the url: http://localhost/Home/index.rails) > > > > PatternRoute("default2","<action>.rails").DefaultForArea > > ().IsEmpty.DefaultForController().Is("Home").D > > efaultForAction().Is("Index")); > > > > (works with the url: http://localhost/index.rails) > > > > PatternRoute("default3","<community>.rails").DefaultForArea > > ().IsEmpty.DefaultForController().Is("Home").D > > efaultForAction().Is("Index").DefaultFor("community").Is("1")); > > > > (works with the url: http://localhost/1.rails) > > > > > > Any thing else gives the mentioned ControllerNotFoundException > > > > Any ideas? > > Thanks. > > > > > > > > > > > -- > > Ricardo Lopes > > > > --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
