问题 create a cmd process and call netstat may get listening ports, but it's complicated and create may be slowly, any build-in method can does this? I found IPGlobalProperties.GetIPGlobalProperties().GetActiveTcpListeners() , but this will return all tcp listener and without process info. 回答1: There is a way to get current Address:Port , which i figure out, while starting the project. The critical thing is that you must define at least once 'ASPNETCORE_URLS' somehow from out-source. If you dont