Currently we are moving from .Net Framework (4.7) to .Net Core / Asp.Net Core.
We are having a few micro services which are using WebAPI and listening on the same port (443).
And we have a single page application (which consists of a few modules (logical units)) and all modules are communicating with our micro services using the same port (443).
With Asp.Net Core port sharing is not supported when using Kestrel, are there any other options then using a reverse proxy like Nginx, Appache (to "redirect" to different ports)?
We can’t use IIS as reverse proxy because we are using gRPC as well which is currently not supported by the IIS.
If the reverse proxy solution is the right way (I personally think it is, because of the MS-doku, can you recommend a reverse proxy, we are using Windows and need support for spnego (Kerberos, NTLM v1, v2), at least the proxy should be able to forward spnego to our IIS which we will probably use for other applications and single sign on solution.
Nginx seems pretty good, but has no build in support for spnego (only in the paied/commercial version).
Br
I know that this is 7 months old question, but if using an HTTPListener is acceptable than my solution to this problem was like this:
Host.CreateDefaultBuilder(args)
.ConfigureWebHostDefaults(webBuilder =>
{
webBuilder.UseStartup<Startup>();
})
.ConfigureWebHost(config =>
{
//We are sharing port with .net HTTPListener object with streaming service on SF cluster so we need to use old HTTP.sys and we can not use new Kestrel
config.UseHttpSys(options =>
{
options.UrlPrefixes.Add(urlPrefix);
});
})
.Build()
One of our services in StatelessService is using prefix "https://+:[portNr]", and asp.net Core host is using "https://+:[portNr]/ws"
Maybe it will be useful to someone
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With