private void Start() { try { AppType type = rdWebForms.Checked ? AppType.WebForms : AppType.MVC; //default only MVC and Webforms are present, no need for complex validation Server = new Server((int)nudPort.Value, txtVirtRoot.Text, txtAppPath.Text, rdbAny.Checked ? IPAddress.Any : IPAddress.Loopback, type); // Register event handlers Server.Started += new EventHandler(ServerStarted); Server.Stopped += new EventHandler(ServerStopped); Server.Start(); this.Status = WebServer.Status.Online; } catch { ShowError("Cassini Managed Web Server failed to start listening on port " + nudPort.Value + ".\r\n" + "Possible conflict with another Web Server on the same port."); } }