We have the need to host ServiceStack in ServiceFabric, this requires us to have some host that supports port sharing. It seems the way to go is [http.sys][1] in .NET Core.
How can we achieve this?
I´ve tried to look at the ServiceStack.Kestrel class AppSelfHostBase and create something similar with a different ConfigureHost method:
public virtual IWebHostBuilder ConfigureHost(IWebHostBuilder host, string[] urlBases)
{
return host
.UseHttpSys(options =>
{
options.MaxRequestBodySize = 30000000;
})
.UseContentRoot(System.IO.Directory.GetCurrentDirectory())
.UseWebRoot(System.IO.Directory.GetCurrentDirectory())
.UseStartup<Startup>()
.UseUrls(urlBases);
}
But this doesnt seem to work, I get no errors or anything but I cant seem to reac the service either (I get 503 unavailable).
[1]: https://docs.microsoft.com/en-us/aspnet/core/fundamentals/servers/httpsys?view=aspnetcore-2.1