Esempio n. 1
0
        private bool GetIsAbleToUsePort()
        {
            IsAbleToUsePort = false;
            try
            {
                var x = new WebClientWithTimeout { Timeout = 3000 };

                IsAbleToUsePort = ("OK" == x.DownloadString(GetPathEndingInSlash() + "testconnection"));
            }
            catch (Exception)
            {
                IsAbleToUsePort = false;
            }
            return IsAbleToUsePort;
        }