Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 866895
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T09:53:08+00:00 2026-05-15T09:53:08+00:00

In our system most of the code is in an asp.net (2.0) web site,

  • 0

In our system most of the code is in an asp.net (2.0) web site, I discovered Castle Monorail a few month ago and I think it’s really easier to use than asp.net / webforms.

Here is what we need :
– Use Castle Monorail
– Our code must be in the website (my chief is a kind of old school web developer so he prefer to have some “.cs” files than one “.dll”).
– We have to keep the existing webforms code

So maybe if you have a tutorial or something like that (I found a lot of tutorial about asp.net MVC and castle monorail but I did find any with asp.net 2.0)/

Merci les collegues

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-15T09:53:09+00:00Added an answer on May 15, 2026 at 9:53 am

    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

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

We're seeing an odd pattern in our QA Lab. We have two ASP.NET applications,
We have some code that occasionally flushed out certain keys in the ASP.NET cache
I have an ASP.NET 2.0 application that is working fine in our local environment.
Most of our projects use a lot of common code. We are (finally) moving
Our system uses an Entity Framework based data layer. For the recent months, we've
Our system will go through a platform upgrade that includes the replacement of Java
Our system complexity has risen to the point that we need to make permission
Our system uses a lot of large Bitmaps (System.Drawing.Bitmap) and sometimes we run out
Our system directs users to a relative path in this format: /some_path/?query=string The server
In our system, we have URLs for pages where the content, including the title,

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.