I'm adding a function to a Delphi 7 application which simulates the "Website -> ASP.Net Configuration" option from Visual Web Developer 2008 Express.
It more or less works, i.e. it starts the ASP.Net Development Server, and launches the browser with the appropriate URL.
However, if Visual Web Developer is already running on the given port, then it obviously throws an error. There doesn't seem to be an option to make it silent (though if anyone knows of one, that would be very useful!)
I found an example of how to get a list of running processes, but unfortunately that just identifies whether or not an instnace is running, not what port it is on.
However, when you pass your mouse over the ASP.Net Development Server icon in the system tray it shows the tooltip "ASP.Net Development Server - Port XXXXX".
This is the information that I need! Is there anyway to get at it?
Or of course if there is another way to reliably identify whether or not it is running on a particular port.