Closed alexbeletsky closed 12 years ago
Still two minor corrections for that version:
In ElmahResult, in subroutine public override void ExecuteResult(ControllerContext context)
After this statement there if (!string.IsNullOrEmpty(m_resouceType)) {...} add
// BugFix if (context.HttpContext.Request.RawUrl != null) { if (context.HttpContext.Request.RawUrl.EndsWith("/elmah/", StringComparison.OrdinalIgnoreCase)) context.HttpContext.RewritePath(context.HttpContext.Request.RawUrl.TrimEnd('/')); }
And in ElmahController.cs, public ActionResult Index(string type)
{
return new ElmahResult(type);
}
instead of
public ActionResult Index()
This will make it possible that it also works with this url: http://localhost:57443/elmah/ instead of just http://localhost:57443/elmah
and also
http://localhost:57443/admin/elmah/ instead of just http://localhost:57443/admin/elmah
Otherwise, it doesn't find the stylesheets when the url ends with / because the url will be /elmah//stylesheet.css. Just my additional 5 cents ;)
In-directly fixed with new ElmahResult code.
Still two minor corrections for that version:
In ElmahResult, in subroutine public override void ExecuteResult(ControllerContext context)
After this statement there if (!string.IsNullOrEmpty(m_resouceType)) {...} add
And in ElmahController.cs, public ActionResult Index(string type)
{
}
instead of
public ActionResult Index()
This will make it possible that it also works with this url: http://localhost:57443/elmah/ instead of just http://localhost:57443/elmah
and also
http://localhost:57443/admin/elmah/ instead of just http://localhost:57443/admin/elmah
Otherwise, it doesn't find the stylesheets when the url ends with / because the url will be /elmah//stylesheet.css. Just my additional 5 cents ;)