diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Code/RemoteDesktopServices/RemoteDesktopServicesController.cs b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Code/RemoteDesktopServices/RemoteDesktopServicesController.cs
index 752b6d9b..130f395d 100644
--- a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Code/RemoteDesktopServices/RemoteDesktopServicesController.cs
+++ b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Code/RemoteDesktopServices/RemoteDesktopServicesController.cs
@@ -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;
diff --git a/WebsitePanel/Sources/WebsitePanel.Providers.Base/RemoteDesktopServices/IRemoteDesktopServices.cs b/WebsitePanel/Sources/WebsitePanel.Providers.Base/RemoteDesktopServices/IRemoteDesktopServices.cs
index 6de22e8d..acb3cc5d 100644
--- a/WebsitePanel/Sources/WebsitePanel.Providers.Base/RemoteDesktopServices/IRemoteDesktopServices.cs
+++ b/WebsitePanel/Sources/WebsitePanel.Providers.Base/RemoteDesktopServices/IRemoteDesktopServices.cs
@@ -63,5 +63,6 @@ namespace WebsitePanel.Providers.RemoteDesktopServices
bool CheckServerAvailability(string hostName);
string[] GetApplicationUsers(string collectionName, string applicationName);
bool SetApplicationUsers(string collectionName, RemoteApplication remoteApp, string[] users);
+ bool CheckRDSServerAvaliable(string hostname);
}
}
diff --git a/WebsitePanel/Sources/WebsitePanel.Providers.TerminalServices.Windows2012/Windows2012.cs b/WebsitePanel/Sources/WebsitePanel.Providers.TerminalServices.Windows2012/Windows2012.cs
index 16552df1..c15e2c69 100644
--- a/WebsitePanel/Sources/WebsitePanel.Providers.TerminalServices.Windows2012/Windows2012.cs
+++ b/WebsitePanel/Sources/WebsitePanel.Providers.TerminalServices.Windows2012/Windows2012.cs
@@ -165,6 +165,20 @@ namespace WebsitePanel.Providers.RemoteDesktopServices
return new string[]{};
}
+ public bool CheckRDSServerAvaliable(string hostname)
+ {
+ bool result = false;
+ var ping = new Ping();
+ var reply = ping.Send(hostname, 1000);
+
+ if (reply.Status == IPStatus.Success)
+ {
+ result = true;
+ }
+
+ return result;
+ }
+
#endregion
#region RDS Collections
diff --git a/WebsitePanel/Sources/WebsitePanel.Server.Client/RemoteDesktopServicesProxy.cs b/WebsitePanel/Sources/WebsitePanel.Server.Client/RemoteDesktopServicesProxy.cs
index f3f14bca..79bd1a40 100644
--- a/WebsitePanel/Sources/WebsitePanel.Server.Client/RemoteDesktopServicesProxy.cs
+++ b/WebsitePanel/Sources/WebsitePanel.Server.Client/RemoteDesktopServicesProxy.cs
@@ -69,6 +69,8 @@ namespace WebsitePanel.Providers.RemoteDesktopServices {
private System.Threading.SendOrPostCallback SetApplicationUsersOperationCompleted;
+ private System.Threading.SendOrPostCallback CheckRDSServerAvaliableOperationCompleted;
+
///
public RemoteDesktopServices() {
this.Url = "http://localhost:9003/RemoteDesktopServices.asmx";
@@ -134,6 +136,9 @@ namespace WebsitePanel.Providers.RemoteDesktopServices {
///
public event SetApplicationUsersCompletedEventHandler SetApplicationUsersCompleted;
+ ///
+ public event CheckRDSServerAvaliableCompletedEventHandler CheckRDSServerAvaliableCompleted;
+
///
[System.Web.Services.Protocols.SoapHeaderAttribute("ServiceProviderSettingsSoapHeaderValue")]
[System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/server/CreateCollection", RequestNamespace="http://smbsaas/websitepanel/server/", ResponseNamespace="http://smbsaas/websitepanel/server/", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]
@@ -1021,6 +1026,48 @@ namespace WebsitePanel.Providers.RemoteDesktopServices {
}
}
+ ///
+ [System.Web.Services.Protocols.SoapHeaderAttribute("ServiceProviderSettingsSoapHeaderValue")]
+ [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/server/CheckRDSServerAvaliable", RequestNamespace="http://smbsaas/websitepanel/server/", ResponseNamespace="http://smbsaas/websitepanel/server/", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]
+ public bool CheckRDSServerAvaliable(string hostname) {
+ object[] results = this.Invoke("CheckRDSServerAvaliable", new object[] {
+ hostname});
+ return ((bool)(results[0]));
+ }
+
+ ///
+ public System.IAsyncResult BeginCheckRDSServerAvaliable(string hostname, System.AsyncCallback callback, object asyncState) {
+ return this.BeginInvoke("CheckRDSServerAvaliable", new object[] {
+ hostname}, callback, asyncState);
+ }
+
+ ///
+ public bool EndCheckRDSServerAvaliable(System.IAsyncResult asyncResult) {
+ object[] results = this.EndInvoke(asyncResult);
+ return ((bool)(results[0]));
+ }
+
+ ///
+ public void CheckRDSServerAvaliableAsync(string hostname) {
+ this.CheckRDSServerAvaliableAsync(hostname, null);
+ }
+
+ ///
+ public void CheckRDSServerAvaliableAsync(string hostname, object userState) {
+ if ((this.CheckRDSServerAvaliableOperationCompleted == null)) {
+ this.CheckRDSServerAvaliableOperationCompleted = new System.Threading.SendOrPostCallback(this.OnCheckRDSServerAvaliableOperationCompleted);
+ }
+ this.InvokeAsync("CheckRDSServerAvaliable", new object[] {
+ hostname}, this.CheckRDSServerAvaliableOperationCompleted, userState);
+ }
+
+ private void OnCheckRDSServerAvaliableOperationCompleted(object arg) {
+ if ((this.CheckRDSServerAvaliableCompleted != null)) {
+ System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg));
+ this.CheckRDSServerAvaliableCompleted(this, new CheckRDSServerAvaliableCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState));
+ }
+ }
+
///
public new void CancelAsync(object userState) {
base.CancelAsync(userState);
@@ -1436,4 +1483,30 @@ namespace WebsitePanel.Providers.RemoteDesktopServices {
}
}
}
+
+ ///
+ [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")]
+ public delegate void CheckRDSServerAvaliableCompletedEventHandler(object sender, CheckRDSServerAvaliableCompletedEventArgs e);
+
+ ///
+ [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")]
+ [System.Diagnostics.DebuggerStepThroughAttribute()]
+ [System.ComponentModel.DesignerCategoryAttribute("code")]
+ public partial class CheckRDSServerAvaliableCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs {
+
+ private object[] results;
+
+ internal CheckRDSServerAvaliableCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) :
+ base(exception, cancelled, userState) {
+ this.results = results;
+ }
+
+ ///
+ public bool Result {
+ get {
+ this.RaiseExceptionIfNecessary();
+ return ((bool)(this.results[0]));
+ }
+ }
+ }
}
diff --git a/WebsitePanel/Sources/WebsitePanel.Server/RemoteDesktopServices.asmx.cs b/WebsitePanel/Sources/WebsitePanel.Server/RemoteDesktopServices.asmx.cs
index 46ebb460..facdb011 100644
--- a/WebsitePanel/Sources/WebsitePanel.Server/RemoteDesktopServices.asmx.cs
+++ b/WebsitePanel/Sources/WebsitePanel.Server/RemoteDesktopServices.asmx.cs
@@ -393,5 +393,22 @@ namespace WebsitePanel.Server
throw;
}
}
+
+ [WebMethod, SoapHeader("settings")]
+ public bool CheckRDSServerAvaliable(string hostname)
+ {
+ try
+ {
+ Log.WriteStart("'{0}' CheckRDSServerAvaliable", ProviderSettings.ProviderName);
+ var result = RDSProvider.CheckRDSServerAvaliable(hostname);
+ Log.WriteEnd("'{0}' CheckRDSServerAvaliable", ProviderSettings.ProviderName);
+ return result;
+ }
+ catch (Exception ex)
+ {
+ Log.WriteError(String.Format("'{0}' CheckRDSServerAvaliable", ProviderSettings.ProviderName), ex);
+ throw;
+ }
+ }
}
}
diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/App_GlobalResources/WebsitePanel_SharedResources.ascx.resx b/WebsitePanel/Sources/WebsitePanel.WebPortal/App_GlobalResources/WebsitePanel_SharedResources.ascx.resx
index c8d36c92..5a90921e 100644
--- a/WebsitePanel/Sources/WebsitePanel.WebPortal/App_GlobalResources/WebsitePanel_SharedResources.ascx.resx
+++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/App_GlobalResources/WebsitePanel_SharedResources.ascx.resx
@@ -5620,5 +5620,8 @@
Check domain expiration date
+
+ Unable to add RDS Server
+
\ No newline at end of file
diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/RDS/AssignedRDSServers.ascx b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/RDS/AssignedRDSServers.ascx
index 0ce2a538..6016913e 100644
--- a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/RDS/AssignedRDSServers.ascx
+++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/RDS/AssignedRDSServers.ascx
@@ -67,8 +67,7 @@
-
+ meta:resourcekey="cmdDelete" OnClientClick="return confirm('Are you sure you want to remove selected server?')">
diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/RDS/RDSEditCollectionApps.ascx.cs b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/RDS/RDSEditCollectionApps.ascx.cs
index cfd3e35d..5b78eb62 100644
--- a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/RDS/RDSEditCollectionApps.ascx.cs
+++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/RDS/RDSEditCollectionApps.ascx.cs
@@ -41,6 +41,8 @@ namespace WebsitePanel.Portal.RDS
protected void Page_Load(object sender, EventArgs e)
{
+ remoreApps.Module = Module;
+
if (!IsPostBack)
{
RdsCollection collection = ES.Services.RDS.GetRdsCollection(PanelRequest.CollectionID);
@@ -48,8 +50,8 @@ namespace WebsitePanel.Portal.RDS
locCName.Text = collection.Name;
- remoreApps.SetApps(collectionApps, Module);
- }
+ remoreApps.SetApps(collectionApps);
+ }
}
protected void btnSave_Click(object sender, EventArgs e)
diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/RDSServers.ascx b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/RDSServers.ascx
index 70cf33d6..0aa32a4e 100644
--- a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/RDSServers.ascx
+++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/RDSServers.ascx
@@ -43,16 +43,16 @@
-
+
-
-
+
+
+
-
+ meta:resourcekey="cmdDelete" OnClientClick="return confirm('Are you sure you want to delete selected rds server?')">
diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/RDSServersAddserver.ascx b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/RDSServersAddserver.ascx
index 2f9d100a..e7f20993 100644
--- a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/RDSServersAddserver.ascx
+++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/RDSServersAddserver.ascx
@@ -20,8 +20,7 @@
|
-
-
+
|
diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/RDSServersAddserver.ascx.designer.cs b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/RDSServersAddserver.ascx.designer.cs
index 526938b3..7bf05979 100644
--- a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/RDSServersAddserver.ascx.designer.cs
+++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/RDSServersAddserver.ascx.designer.cs
@@ -75,15 +75,6 @@ namespace WebsitePanel.Portal {
///
protected global::System.Web.UI.WebControls.TextBox txtServerComments;
- ///
- /// valServerComments control.
- ///
- ///
- /// Auto-generated field.
- /// To modify move field declaration from designer file to code-behind file.
- ///
- protected global::System.Web.UI.WebControls.RequiredFieldValidator valServerComments;
-
///
/// btnAdd control.
///