Newbie Question: Can't get Monorail-trunk to execute MonoRailHttpHandlerFactory

4 views
Skip to first unread message

Tigraine

unread,
May 25, 2009, 2:49:52 PM5/25/09
to Castle Project Users
Hello there.
I know this now sounds kind of silly, but I am simply not able to
convince MonoRail to call my controller.

I'm currently trying to set up a sample project and I've been
following the (outdated) sample @ http://www.castleproject.org/monorail/gettingstarted/creatingproject.html
.

I figured out that the EngineContextModule is no longer needed, so I
removed that. But still I get only 404 errors when I try accessing /
Home/Index.castle

Here is the web.config (Most of the config is 1:1 copied from the
TestSiteARSupport project from the svn):

<?xml version="1.0"?>
<configuration>
<configSections>
<section name="monorail"
type="Castle.MonoRail.Framework.Configuration.MonoRailSectionHandler,
Castle.MonoRail.Framework"/>
</configSections>
<monorail>
<controllers>
<assembly>ImagineClubWeb</assembly>
</controllers>
<viewEngine viewPathRoot="views"
customEngine="Castle.MonoRail.Framework.Views.NVelocity.NVelocityViewEngine,
Castle.MonoRail.Framework.Views.NVelocity"/>
</monorail>


<system.web>
<compilation debug="true">
<assemblies>
<add assembly="System.Core, Version=3.5.0.0, Culture=neutral,
PublicKeyToken=B77A5C561934E089"/>
<add assembly="System.Data.DataSetExtensions, Version=3.5.0.0,
Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
<add assembly="System.Web.Extensions, Version=3.5.0.0,
Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
<add assembly="System.Xml.Linq, Version=3.5.0.0, Culture=neutral,
PublicKeyToken=B77A5C561934E089"/>
</assemblies>
</compilation>
<httpHandlers>
<add verb="*" path="*.castle"
type="Castle.MonoRail.Framework.MonoRailHttpHandlerFactory,
Castle.MonoRail.Framework"/>
</httpHandlers>
</system.web>
</configuration>


I guess I am missing something very very stupid. But I can't see the
problem at the moment.
The whole project (2 files..) is also in my Bitbucket in case you want
to check anything on the csproj etc.. (All referenced assemblies are
in /lib the code is in /src)
http://bitbucket.org/Tigraine/ic-website/src/

Any help would be appreciated, I've spent almost 3 hours looking at
other people's code and I simply can't find out why in my case this
thing doesn't work out. I already deleted the whole thing twice just
to start over fresh, but I couldn't get it working.
Only thing I got working was referencing the old RC3 assemblies, but I
want to run from the trunk.

greetings Daniel

Gauthier Segay

unread,
May 25, 2009, 4:18:42 PM5/25/09
to Castle Project Users
What server are you running?

If you are using IIS < 7 you also need to assign .castle extension to
aspnet isapi handler in the site settings

if you are using visualstudio webserver it should just work (every
httprequest is handled by the server)

I don't have instruction for IIS 7 at the moment

On May 25, 8:49 pm, Tigraine <hoelblin...@gmail.com> wrote:
> Hello there.
> I know this now sounds kind of silly, but I am simply not able to
> convince MonoRail to call my controller.
>
> I'm currently trying to set up a sample project and I've been
> following the (outdated) sample @http://www.castleproject.org/monorail/gettingstarted/creatingproject....
> in /lib the code is in /src)http://bitbucket.org/Tigraine/ic-website/src/

Tigraine

unread,
May 25, 2009, 4:43:02 PM5/25/09
to Castle Project Users
Oh, sorry I forgot to mention that.
I'm trying to make it work inside VS. That also works (tried by
running against RC3 assemblies).

greetings Daniel

Ken Egozi

unread,
May 25, 2009, 5:12:23 PM5/25/09
to castle-pro...@googlegroups.com
see if you have needed prerequisites in the bin.
usually Castle.Components.Binder.dll and Castle.Components.Common.EmailSender.dll are the ones to blame (cuz usually you won't reference them, so you'd have to have a postbuild event to move them into bin)

Tigraine

unread,
May 26, 2009, 4:47:44 AM5/26/09
to Castle Project Users
I already checked that, they are reference:

<Reference Include="Castle.Components.Binder, Version=1.0.3.0,
Culture=neutral, PublicKeyToken=407dd0808d44fbdc,
processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\lib\monorail-trunk\Castle.Components.Binder.dll</
HintPath>
</Reference>
<Reference Include="Castle.Components.Common.EmailSender,
Version=1.0.3.0, Culture=neutral, PublicKeyToken=407dd0808d44fbdc,
processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\lib\monorail-trunk
\Castle.Components.Common.EmailSender.dll</HintPath>
</Reference>
<Reference Include="Castle.Components.Validator, Version=1.0.3.0,
Culture=neutral, PublicKeyToken=407dd0808d44fbdc,
processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\lib\monorail-trunk
\Castle.Components.Validator.dll</HintPath>
</Reference>
<Reference Include="Castle.Core, Version=1.1.0.0, Culture=neutral,
PublicKeyToken=407dd0808d44fbdc, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\lib\monorail-trunk\Castle.Core.dll</HintPath>
</Reference>
<Reference Include="Castle.MonoRail.Framework, Version=1.0.3.0,
Culture=neutral, PublicKeyToken=407dd0808d44fbdc,
processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\lib\monorail-trunk
\Castle.MonoRail.Framework.dll</HintPath>
</Reference>
<Reference Include="Castle.MonoRail.Framework.Views.NVelocity,
Version=1.0.3.0, Culture=neutral, PublicKeyToken=407dd0808d44fbdc,
processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\lib\monorail-trunk
\Castle.MonoRail.Framework.Views.NVelocity.dll</HintPath>
</Reference>
<Reference Include="NVelocity, Version=1.0.3.0, Culture=neutral,
PublicKeyToken=407dd0808d44fbdc, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\lib\monorail-trunk\NVelocity.dll</HintPath>
</Reference>

(http://bitbucket.org/Tigraine/ic-website/src/tip/src/ImagineClub.Web/
ImagineClub.Web.csproj)

Roelof Blom

unread,
May 26, 2009, 5:19:15 AM5/26/09
to castle-pro...@googlegroups.com
Tigraine,

You're missing the DictionaryAdapter component.

-- Roelof.

Tigraine

unread,
May 26, 2009, 6:10:56 AM5/26/09
to Castle Project Users
Oh, right.
Thank you very much. It now works.
I somehow feel like there should have been some sort of an
Errormessage telling me what went wrong. This way it felt very
frustrating.

greetings Daniel
> >http://www.kenegozi.com/bloghttp://www.delver.comhttp://www.musicglue...

John Simons

unread,
May 26, 2009, 7:28:54 AM5/26/09
to Castle Project Users
Tigraine,

There is an error message, did you look at your Event Viewer?
Also, to debug this issues, the simplest way I found is to turn on the
fusion log.

Cheers
John
Reply all
Reply to author
Forward
0 new messages