Diggina a bit further, this may not be that difficult after all.

If we add a framework base class similar to th eone I've attached
below (hopefully GMail won't mangle it that much), then the code for
the ProcessRequest method should be fairly simple for someone who is
familar with the Monorail internals.   That would leave handling the
effect of GetHttpHandler in a virtual method in a derived class, which
should be fairly straightforward for the "end-user".

namespace Castle.MonoRail.Framework.Routing.MSFT
{
    using System.Web;
    using System.Web.Routing;

    public class MonoRailRoutehandler : IHttpHandler, IRouteHandler
    {
        string Controller { get; set; }
        string Action { get; set; }
        private object[] Parmeteres;

        #region IRouteHandler Members
        public IHttpHandler GetHttpHandler(RequestContext requestContext)
        {
            // use requestContext to initialize Controller, Action,
and Parameter fields
            return this;
        }
        #endregion

        #region IHttpHandler Members

        public bool IsReusable
        {
            get { return false; }   // Until a better answer is determined.
        }

        public void ProcessRequest(HttpContext context)
        {
            // Instaniated Controller, and call Action with Paramaters.
        }
        #endregion
    }
}





On Tue, Oct 13, 2009 at 9:33 AM, James Curran <[email protected]> wrote:
> Not without some effort.
>
> Here's an article on using it in ASP.NET without MVC:
> http://aspnet.4guysfromrolla.com/articles/051309-1.aspx
>
> Essentially, you would have to create a class which implements the
> IRouteHandler interface, which mainly involves a method which returns
> a IHttpHandler object.  In ASP.NET, that would be the Page object that
> you want to run.  Hence we would need to make an adapter which would
> wrap a Controller/Action into an IHttpHandler.
>
>
> On Tue, Oct 13, 2009 at 6:22 AM, c.sokun <[email protected]> wrote:
>>
>> Recently I notice there is no improvement over the MonoRail built-in
>> routing engine.
>> Is it possible to use ASP.NET MVC routing engine with MonoRail ?
>> >>
>>
>
>
>
> --
> Truth,
>    James
>



-- 
Truth,
    James

--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to