As is, the port in which NAME is listening is sent to the Registry as null when using the WebApi and AspNetCore packages.
Getting the port is not trivial, and some discussion may be needed.
For apps hosted in IIS we can use the Microsoft.Web.Administration namespace to get this information, so at least the NAME.WebApi package should send the port.