So it was pretty simple (15 min top) :
1/ Get the element that you need from web.config :
- config section handler
<section name="monorail" type="Castle.MonoRail.Framework.Configuration.MonoRailSectionHandler, Castle.MonoRail.Framework" />
-Configuration itself
<monorail>
<controllers>
<assembly>App_Code</assembly>
<assembly>Castle.Monorail.ViewComponents</assembly>
</controllers>
<viewEngines viewPathRoot="Views">
<add type="Castle.MonoRail.Framework.Views.NVelocity.NVelocityViewEngine, Castle.MonoRail.Framework.Views.NVelocity" />
</viewEngines>
</monorail>
"App_Code" is the name of the web site assembly.
-http handlers
<add verb="*" path="*.rails" type="Castle.MonoRail.Framework.MonoRailHttpHandlerFactory, Castle.MonoRail.Framework" />
<!--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" />
-http modules
<add name="monorail" type="Castle.MonoRail.Framework.EngineContextModule, Castle.MonoRail.Framework" />
2/ Take the dll that you need, in my case (I don't use activerecord) :
Castle.Components.Binder.dll
Castle.Components.Common.EmailSender.dll
Castle.Components.Common.TemplateEngine.dll
Castle.Components.Common.TemplateEngine.NVelocityTemplateEngine.dll
Castle.Components.Validator.dll
Castle.Core.dll
Castle.MonoRail.Framework.dll
Castle.MonoRail.Framework.Views.NVelocity.dll
Castle.MonoRail.ViewComponents.dll
3/ Add a class in your App_Code folder (for instance TestMonorailController) :
using Castle.MonoRail.Framework;
public class TestMonorailController : SmartDispatcherController
{
public TestMonorailController()
{
}
public void OnePage()
{
PropertyBag["toto"] = "TEST";
}
}
4/ Add a Views folder in the root of your website
5/ Add a TestMonorail folder in the folder you just created
6/ Add a file name "OnePage.vm" in this folder :
$toto
7/ Test your website :
http://localhost:XX/YourWebSite/TestMonorail/OnePage.rails
and you should see
"TEST"
Et voila :) I can edit my production code. Thx Ken