Feedback fixes
This commit is contained in:
parent
4de74dcea7
commit
acb9445b4b
11 changed files with 132 additions and 32 deletions
|
@ -605,13 +605,20 @@ namespace WebsitePanel.EnterpriseServer
|
|||
}
|
||||
else
|
||||
{
|
||||
result.AddError("", new Exception("The server that you are adding, is not available"));
|
||||
result.AddError("REMOTE_DESKTOP_SERVICES_ADD_RDS_SERVER", new Exception("The server that you are adding, is not available"));
|
||||
return result;
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
result.AddError("REMOTE_DESKTOP_SERVICES_ADD_RDS_SERVER", ex);
|
||||
if (ex.InnerException != null)
|
||||
{
|
||||
result.AddError("Unable to add RDS Server", ex.InnerException);
|
||||
}
|
||||
else
|
||||
{
|
||||
result.AddError("Unable to add RDS Server", ex);
|
||||
}
|
||||
}
|
||||
finally
|
||||
{
|
||||
|
@ -1167,18 +1174,12 @@ namespace WebsitePanel.EnterpriseServer
|
|||
private static bool CheckRDSServerAvaliable(string hostname)
|
||||
{
|
||||
bool result = false;
|
||||
var ping = new Ping();
|
||||
var reply = ping.Send(hostname, 1000);
|
||||
|
||||
try
|
||||
if (reply.Status == IPStatus.Success)
|
||||
{
|
||||
var ping = new Ping();
|
||||
var reply = ping.Send(hostname, 1000); // 1 second time out (in ms)
|
||||
|
||||
if (reply.Status == IPStatus.Success)
|
||||
result = true;
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
result = false;
|
||||
result = true;
|
||||
}
|
||||
|
||||
return result;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue