diff --git a/WebsitePanel/Database/update_db.sql b/WebsitePanel/Database/update_db.sql index 169faaa0..9d52ba3e 100644 --- a/WebsitePanel/Database/update_db.sql +++ b/WebsitePanel/Database/update_db.sql @@ -5511,14 +5511,14 @@ GO IF NOT EXISTS(SELECT * FROM sys.columns WHERE [name] = N'SecurityLayer' AND [object_id] = OBJECT_ID(N'RDSCollectionSettings')) BEGIN - ALTER TABLE [dbo].[RDSCollectionSettings] ADD SecurityLayer NAVRCHAR(20) null; + ALTER TABLE [dbo].[RDSCollectionSettings] ADD SecurityLayer NVARCHAR(20) null; END GO IF NOT EXISTS(SELECT * FROM sys.columns WHERE [name] = N'EncryptionLevel' AND [object_id] = OBJECT_ID(N'RDSCollectionSettings')) BEGIN - ALTER TABLE [dbo].[RDSCollectionSettings] ADD EncryptionLevel NAVRCHAR(20) null; + ALTER TABLE [dbo].[RDSCollectionSettings] ADD EncryptionLevel NVARCHAR(20) null; END GO diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Code/RemoteDesktopServices/RemoteDesktopServicesController.cs b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Code/RemoteDesktopServices/RemoteDesktopServicesController.cs index dad53cc7..2b0e1ab3 100644 --- a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Code/RemoteDesktopServices/RemoteDesktopServicesController.cs +++ b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Code/RemoteDesktopServices/RemoteDesktopServicesController.cs @@ -499,19 +499,22 @@ namespace WebsitePanel.EnterpriseServer var collection = ObjectUtils.FillObjectFromDataReader(DataProvider.GetRDSCollectionById(collectionId)); var settings = ObjectUtils.FillObjectFromDataReader(DataProvider.GetRdsCollectionSettingsByCollectionId(collectionId)); - if (settings.SecurityLayer == null) + if (settings != null) { - settings.SecurityLayer = SecurityLayerValues.Negotiate.ToString(); - } + if (settings.SecurityLayer == null) + { + settings.SecurityLayer = SecurityLayerValues.Negotiate.ToString(); + } - if (settings.EncryptionLevel == null) - { - settings.EncryptionLevel = EncryptionLevel.ClientCompatible.ToString(); - } + if (settings.EncryptionLevel == null) + { + settings.EncryptionLevel = EncryptionLevel.ClientCompatible.ToString(); + } - if (settings.AuthenticateUsingNLA == null) - { - settings.AuthenticateUsingNLA = true; + if (settings.AuthenticateUsingNLA == null) + { + settings.AuthenticateUsingNLA = true; + } } return settings;