Hi, I'm trying to get the routing working on an IIS7 setup but I'm not
sure if there is IIS7 that gives me problem or if I'm doing something wrong.
This is my setup:
<system.webServer>
<modules>
<add name="routingEx"
type="Castle.MonoRail.Framework.Routing.RoutingModuleEx,Castle.MonoRail.Framework"
preCondition="managedHandler" />
</modules>
<handlers>
<clear />
<add name="MonoRail" path="*" verb="*"
type="Castle.MonoRail.Framework.MonoRailHttpHandlerFactory,
Castle.MonoRail.Framework" preCondition="integratedMode" />
<add name="vm" verb="*" path="*.vm"
type="System.Web.HttpForbiddenHandler" preCondition="integratedMode" />
<add name="boo" verb="*" path="*.boo"
type="System.Web.HttpForbiddenHandler" preCondition="integratedMode" />
<add name="st" verb="*" path="*.st"
type="System.Web.HttpForbiddenHandler" preCondition="integratedMode" />
</handlers>
<validation validateIntegratedModeConfiguration="false" />
</system.webServer>
And in my <monorail> I have:
<routing>
<rule>
<pattern>/images/(\d+)/(\w+)\.jpg$</pattern>
<replace><![CDATA[
/resource/image.rails?size=$2&imageID=$1 ]]></replace>
</rule>
</routing>
Basically, what I want to do is replace /images/1/small.jpg to
/resource/image.rails?imageID=1&size=small
However, it doesn't seem to kick in, since I get
//Controller not found. Area: 'images' Controller Name: '1'
//I've read that IIS7 and integrated mode gives you trouble with the
routing, but never any solution to the problem or any real explanation
to why that is. I'm a little dazzled about how .NET actually know about
IEngineContext since I don't specify that anywhere in my Web.config, all
I have is the handler that maps to MonoRailHttpHandlerFactory. Is that
the issue, that the Routing doesn't kick in before the handler?
And I haven't seen any way to get useful debugdata regarding the routing...?
When people give example where they configure the routing in code, where
do they do that? Application_OnStart? How do they access RoutingEngineEx
in that case?
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---