Last post Sep 16, 2016 09:39 PM by bruce (sqlwork.com)
Sep 16, 2016 12:58 PM|Jason_Coder|LINK
When using kestrel with iis integration, I am not seeing the standard port (5000) being used in netstat. Some other port is being chosen as used by the dotnet exe. My app is self contained (stand alone exe asp.net core).
So my question is, is the kestrel port even used or opened, when combined with iis integration? I thought it was supposed to be used in this reverse proxy fashion, specifically over that port. And if i ran multiple asp.net core apps with kestrel and iis
integration, i would end up with port conflicts if i didn't change each app to use a different port.
If it is not using the port, how is iis passing the calls thru, or is there some internal port negotiation?
Sep 16, 2016 02:45 PM|Jason_Coder|LINK
I've answered my own question.
I believe the "port" should be left alone, not configured, when using iis integration. When you set usekestrel, and then set useiisintegration, in the builder, the latter argument tells asp.net core that iis is a reverse proxy server and that is where the
port gets sets, during some negotiation with iis. Without use iis integration, then the port would be relevant, and you would want to set it for each deployed app.
I didn't find the following article helpful in explaining the question of port in iis hosting, and this article below did seem like the primary documentation source for doing so.
Sep 16, 2016 09:39 PM|bruce (sqlwork.com)|LINK
there is no port negotiation, other than the defaulting to 5000. if you want to use a different port, you first configure your core app:
or you can use a setting in one of the json files. then you need to config the IIS module to use the custom port via hosting.json file:
note: useiisintegration is used to allow passing of the windows security token from IIS to the core app.