I am trying to get The port which an app is running on, from IIS Express.
So far i tried those two approaches:
//first
var iisExpress = new DirectoryEntry("IIS://localhost/W3SVC/AppPools").Children;
//second
var mgr = new ServerManager().Sites;
But both give me only the DefaultAppPool
with the Default Web App
, while what i need is the apps i'm running localy from Visual Studio.