I've started learning (and using) Monorail a little while ago, and
recently, I've dabbled into routing. Unfortunately, the documentation
around it is kinda sparse, but I've managed to get some info from various
blog posts, most of them 2 years + old. I managed to setup the routing
pretty quickly, BUT I realized that Monorail's routing engine confuses
.jpeg files as controller/action requests WHEN they are not found.
The webconfig file is pretty standard:
<monorail useWindsorIntegration="false" defaultUrlExtension=".rails">
<url useExtensions="true"/>
<controllers>
<assembly>NetTwitter.Web</assembly>
</controllers>
<viewcomponents>
<assembly>NetTwitter.Web</assembly>
</viewcomponents>
<viewEngine viewPathRoot="Views"
customEngine="Castle.MonoRail.Framework.Views.NVelocity.NVelocityViewEngine,
Castle.MonoRail.Framework.Views.NVelocity"/>
</monorail>
<system.web>
<httpHandlers>
<!-- block direct user access to template files -->
<add verb="*" path="*.vm" type="System.Web.HttpForbiddenHandler"/>
<add verb="*" path="*.boo" type="System.Web.HttpForbiddenHandler"/>
<add verb="*" path="*.st" type="System.Web.HttpForbiddenHandler"/>
<add verb="GET" path="*.css" type="System.Web.StaticFileHandler" />
<add verb="GET" path="*.js" type="System.Web.StaticFileHandler" />
<add verb="GET" path="*.jpg" type="System.Web.StaticFileHandler" />
<add verb="GET" path="*.gif" type="System.Web.StaticFileHandler" />
<add verb="GET" path="*.png" type="System.Web.StaticFileHandler" />
<add verb="GET" path="*.jpeg" type="System.Web.StaticFileHandler" />
<add verb="*" path="*.rails"
type="Castle.MonoRail.Framework.MonoRailHttpHandlerFactory,
Castle.MonoRail.Framework"/>
</httpHandlers>
<httpModules>
<add name="routing"
type="Castle.MonoRail.Framework.Routing.RoutingModuleEx,
Castle.MonoRail.Framework" />
</httpModules>
As is the initialization of the routing engine inside the Global.asax:
public void Application_OnStart()
{
log4net.Config.XmlConfigurator.Configure();
RoutingModuleEx.Engine.Add(
new PatternRoute("<controller>/[action]"));
}
The error itself says it pretty clearly:
{"Controller not found. Area: '' Controller Name: 'content'"}
So, what can I do? Thanks in advance.
--
You received this message because you are subscribed to the Google Groups
"Castle Project Users" group.
To view this discussion on the web visit
https://groups.google.com/d/msg/castle-project-users/-/0xf16ytDhwMJ.
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.