private static void PopulateProcessInformation(int processId) { Microsoft.Web.RuntimeStatus.WorkerProcess workerProcess = null; try { using (var client = new RuntimeStatusClient()) { workerProcess = client.GetWorkerProcess(processId); foreach (string str in workerProcess.RegisteredUrlsInfo) { string[] strArray = str.Split(new char[] { '|' }); if (strArray.Length == 3) { string siteName = strArray[0]; string physicalPath = strArray[1]; string url = strArray[2]; url = url.Replace("://*:", "://localhost:"); Sites.Add(siteName.ToLower()); //this.Applications.Add(new IisExpressApplication(siteName, url, IisExpressHelper.GetPortNumberFromUrl(str), physicalPath, this)); } } } } catch (Exception) { } finally { if (workerProcess != null) { workerProcess.Dispose(); } } }