Custom AppSelfHostBase breaking razor request handlers

I want to use a custom AppSelfHostBase so I can have more control over the thread pool.

Previous Class Inheritance

public abstract class CustomAppSelfHost : AppSelfHostBase

New Class Inheritance

public abstract class CustomAppSelfHost : CustomAppSelfHostBase

The new class inheritance results in an error for razor views: Handler for Request not found (404):.

Is there a way around this?

Note: I’d like to keep CustomAppSelfHost and CustomAppSelfHostBase separate if possible.

Found the issue, WebHostPhysicalPath was not being set correctly after I changed the class names.

if (appHost.GetType().IsInstanceOf(typeof (CustomAppSelfHostBase)))
{
    //when running as self hosted app, load cshtml, images, html, etc from /Resources
    hostConfig.WebHostPhysicalPath = "~/Resources".MapServerPath();
}