public void Configure(IMonoRailConfiguration configuration)
{
configuration.ViewEngineConfig.ViewPathRoot = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "Views");
configuration.ViewEngineConfig.ViewEngines.Add(new ViewEngineInfo(typeof(NVelocityViewEngine), false));
configuration.ConfigurationSection = new MutableConfiguration("monorail");
configuration.ConfigurationSection.Children.Add(
new MutableConfiguration("exception")
.CreateChild("exceptionHandler")
.Attribute("type", typeof(EmailHandler).AssemblyQualifiedName)
.Attribute("mailTo", "to@email.com")
.Attribute("mailFrom", "from@email.com"));
configuration.ExtensionEntries.Add(
new ExtensionEntry(typeof(ExceptionChainingExtension), new MutableConfiguration("")));
}
This code sets up the EmailHandler that comes with MonoRail.
1 comment:
That's awful. We need to fix that...
Post a Comment