So, my web host (webhost4life) recently migrated our site to a "new
system", which I presume to mean, IIS7.0 (I can't get ANY help/info
from them). It immediately broke our Monorail site, which had been
running fine on the old system. It seems that the routing is now
broken. I have scoured the www looking for how to get this going, and
I seem to have it working locally (on my Windows 7 box) but I cannot
get it working on the WH4L server.
If it is IIS7.0, and I am relatively sure that it is, then I should be
able to do all necessary script mappings, etc in the web.config
itself. Here is (what I think is) the relevant code:
Web.config
<configSections>
<section name="monorail"
type="Castle.MonoRail.Framework.Configuration.MonoRailSectionHandler,
Castle.MonoRail.Framework"/>
</configSections><system.webServer>
<modules>
<add name="routing"
type="Castle.MonoRail.Framework.Routing.RoutingModuleEx,
Castle.MonoRail.Framework" />
</modules>
<handlers>
<clear />
<add name="JavaScriptFiles" path="*.js" verb="GET"
modules="StaticFileModule" scriptProcessor="" resourceType="File"
requireAccess="Script" />
<add name="HtmlPages" path="*.html" verb="GET"
modules="StaticFileModule" scriptProcessor="" resourceType="File"
requireAccess="Script" />
<add name="HtmPages" path="*.htm" verb="GET"
modules="StaticFileModule" scriptProcessor="" resourceType="File"
requireAccess="Script" />
<add name="GifImages" path="*.gif" verb="GET"
modules="StaticFileModule" scriptProcessor="" resourceType="File"
requireAccess="Script" />
<add name="PngImages" path="*.png" verb="GET"
modules="StaticFileModule" scriptProcessor="" resourceType="File"
requireAccess="Script" />
<add name="JpegImages" path="*.jpg" verb="GET"
modules="StaticFileModule" scriptProcessor="" resourceType="File"
requireAccess="Script" />
<add name="CssFiles" path="*.css" verb="GET"
modules="StaticFileModule" scriptProcessor="" resourceType="File"
requireAccess="Script" />
<add name="Icons" path="*.ico" verb="*"
modules="StaticFileModule" scriptProcessor="" resourceType="File"
requireAccess="Script" />
<add name="MonoRail" path="*" verb="*"
type="Castle.MonoRail.Framework.MonoRailHttpHandlerFactory,
Castle.MonoRail.Framework" modules="ManagedPipelineHandler"
scriptProcessor="" resourceType="Unspecified" requireAccess="Script"
allowPathInfo="false" preCondition="" responseBufferLimit="4194304" />
</handlers>
</system.webServer>
Global.asax
public void Application_OnStart(object sender, EventArgs e)
{
container = new WindsorContainer(new XmlInterpreter());
PatternRoute rule = new PatternRoute("default", "/")
.DefaultForController().Is<HomeController>()
.DefaultForAction().Is("index");
RoutingModuleEx.Engine.Add(rule);
RoutingModuleEx.Engine.Add(new PatternRoute("All", "/
<controller>/<action>.pet")
.DefaultForArea().IsEmpty);
}
The .pet extension is the extension I am trying to use (it's a
veterinarian) which, again, worked great before. I am using the
NVelocity view engine, if that matters. The Homepage actually works ,
but if I go to any of the pages with a .pet extension, I get 404. I
just want the simple /<controller>/<action> route to work. No areas
or nested routes or anything else.
Anyway, if anyone has a suggestion on what I can do to try and get
this going, I'd appreciate it.
Thanks,
Ruprict
--
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.