It is only possible if you if you use OWIN and HttpListener from the Katana Project. You can either host Nancy and WebApi on separate paths using the map middleware:
public class Startup
{
public void Configuration(IAppBuilder app)
{
app.Map("/nancy", branch => branch.UseNancy())
.Map("/webapi", branch => branch.UseWebApi());
}
}
Or you can configure Nancy to pass-through to subsequent middleware if, for example, Nancy is responding with a 404:
public class Startup
{
public void Configuration(IAppBuilder app)
{
app.UseNancy(opt =>
opt.PassThroughWhenStatusCodesAre(HttpStatusCode.NotFound)
.UseWebApi();
}
}