public virtual IHttpHandler GetHandler(HttpContext context,
String requestType,
String url, String pathTranslated)
{
if (!EngineContextModule.Initialized)
{
throw new RailsException("Looks like you forgot to register the http module " +
typeof(EngineContextModule).FullName + "\r\nAdd '<add name=\"monorail\" type=\"Castle.MonoRail.Framework.EngineContextModule, Castle.MonoRail.Framework\" />' " +
"to the <httpModules> section on your web.config");
}
IRailsEngineContext mrContext = EngineContextModule.ObtainRailsEngineContext(context);
if (mrContext == null)
{
throw new RailsException("IRailsEngineContext is null. Looks like the " +
"EngineContextModule has not run for this request.");
}
return ObtainMonoRailHandler(mrContext);
}