RazorHandler not disposing ViewPage

Using ServiceStack with Razor MVC. I configured a few custom error pages and a fallback error page in my AppHostBase.Configure override like this:

this.CustomErrorHttpHandlers[HttpStatusCode.MethodNotAllowed] = new RazorHandler("/views/error/comingSoon");
this.CustomErrorHttpHandlers[HttpStatusCode.NotFound] = new RazorHandler("/views/error/notFound");
this.GlobalHtmlErrorHttpHandler = new RazorHandler("/views/error/general");

Each error view inherits from ViewPage but is not disposed when the request ends.

Thanks, this should now be resolved from this commit which is available from ServiceStack v5 that’s now available on MyGet. Please review v5 changes before upgrading.

Thanks for the quick reply. However, RazorHandler now returns 200 with no content.

Created a pull request for a fix I implemented locally.

1 Like

Appreciated, merged!