From e83057fa22e28c5fd231ae06a5a91464a6e3f596 Mon Sep 17 00:00:00 2001 From: Roy Ben-Shabat Date: Sun, 25 Feb 2018 15:14:20 +0200 Subject: Integrated DB & MSUS to Twine Server. --- Software/DB/Tango.mdf | Bin 75497472 -> 75497472 bytes Software/DB/Tango_log.ldf | Bin 8388608 -> 8388608 bytes .../Tango.MachineStudio.Publisher.csproj | 27 +++++++++++++++++++++ .../MachineStudioUpdateService.svc.cs | 17 +++++++++++-- .../Tango.MachineStudio.UpdateService.csproj | 3 +++ .../Tango.MachineStudio.UpdateService/Web.config | 6 ++--- .../Observables/ObservablesContextExtension.cs | 4 +-- Software/Visual_Studio/Tango.Settings/DataBase.cs | 7 +----- .../MachineStudioSettings/MachineStudio.cs | 2 +- 9 files changed, 52 insertions(+), 14 deletions(-) (limited to 'Software') diff --git a/Software/DB/Tango.mdf b/Software/DB/Tango.mdf index 683e47294..13144a5b4 100644 Binary files a/Software/DB/Tango.mdf and b/Software/DB/Tango.mdf differ diff --git a/Software/DB/Tango_log.ldf b/Software/DB/Tango_log.ldf index 6afb62f52..e58af856d 100644 Binary files a/Software/DB/Tango_log.ldf and b/Software/DB/Tango_log.ldf differ diff --git a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Publisher/Tango.MachineStudio.Publisher.csproj b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Publisher/Tango.MachineStudio.Publisher.csproj index 00bbe3539..7b59fa319 100644 --- a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Publisher/Tango.MachineStudio.Publisher.csproj +++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Publisher/Tango.MachineStudio.Publisher.csproj @@ -13,6 +13,21 @@ {60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} 4 true + false + publish\ + true + Disk + false + Foreground + 7 + Days + false + false + true + 0 + 1.0.0.%2a + false + true AnyCPU @@ -135,5 +150,17 @@ Tango.MachineStudio.Common + + + False + Microsoft .NET Framework 4.6 %28x86 and x64%29 + true + + + False + .NET Framework 3.5 SP1 + false + + \ No newline at end of file diff --git a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UpdateService/MachineStudioUpdateService.svc.cs b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UpdateService/MachineStudioUpdateService.svc.cs index 2f001b281..5cc95c617 100644 --- a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UpdateService/MachineStudioUpdateService.svc.cs +++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UpdateService/MachineStudioUpdateService.svc.cs @@ -97,6 +97,12 @@ namespace Tango.MachineStudio.UpdateService { db.Configuration.LazyLoadingEnabled = false; + //Load relation first... + db.Roles.ToList(); + db.Permissions.ToList(); + db.UsersRoles.ToList(); + db.RolesPermissions.ToList(); + var user = db.Users.SingleOrDefault(x => x.Email.ToLower() == request.Email.ToLower() && x.Password == request.Password); if (user != null && user.HasPermission(Permissions.PublishMachineStudioVersion)) @@ -185,9 +191,16 @@ namespace Tango.MachineStudio.UpdateService public string GetLatestVersion() { - using (ObservablesContext db = ObservablesContext.CreateDefaultForWeb()) + try { - return db.MachineStudioVersions.FirstOrDefault().Version; + using (ObservablesContext db = ObservablesContext.CreateDefaultForWeb()) + { + return db.MachineStudioVersions.FirstOrDefault().Version; + } + } + catch (Exception ex) + { + throw new FaultException(ex.ToString()); } } } diff --git a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UpdateService/Tango.MachineStudio.UpdateService.csproj b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UpdateService/Tango.MachineStudio.UpdateService.csproj index 0b4d78195..9e41b1725 100644 --- a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UpdateService/Tango.MachineStudio.UpdateService.csproj +++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UpdateService/Tango.MachineStudio.UpdateService.csproj @@ -81,6 +81,9 @@ + + + Web.config diff --git a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UpdateService/Web.config b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UpdateService/Web.config index b0d2452f0..1805380e9 100644 --- a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UpdateService/Web.config +++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UpdateService/Web.config @@ -6,8 +6,8 @@ - - + + @@ -21,7 +21,7 @@ - + diff --git a/Software/Visual_Studio/Tango.Integration/Observables/ObservablesContextExtension.cs b/Software/Visual_Studio/Tango.Integration/Observables/ObservablesContextExtension.cs index e6618eae2..9484520c5 100644 --- a/Software/Visual_Studio/Tango.Integration/Observables/ObservablesContextExtension.cs +++ b/Software/Visual_Studio/Tango.Integration/Observables/ObservablesContextExtension.cs @@ -19,7 +19,7 @@ namespace Tango.Integration.Observables { if (!isFile) { - return String.Format("Data Source={0};Initial Catalog=Tango;User Id=Developer;Password=1111;", source); + return String.Format("Data Source={0};Initial Catalog=Tango;Integrated Security=True;", source); } else { @@ -42,7 +42,7 @@ namespace Tango.Integration.Observables /// public static ObservablesContext CreateDefaultForWeb() { - return new ObservablesContext("localhost\\SQLEXPRESS", false); + return new ObservablesContext("localhost\\SQLTWINE", false); } } } diff --git a/Software/Visual_Studio/Tango.Settings/DataBase.cs b/Software/Visual_Studio/Tango.Settings/DataBase.cs index 4e5213b3f..22bbfe9a9 100644 --- a/Software/Visual_Studio/Tango.Settings/DataBase.cs +++ b/Software/Visual_Studio/Tango.Settings/DataBase.cs @@ -17,17 +17,12 @@ namespace Tango.Settings /// public String SQLServerAddress { get; set; } - /// - /// Gets or sets a value indicating whether to delete a record from database instead of setting IsDeleted to 'true'. - /// - public bool DeleteForReal { get; set; } - /// /// Initializes a new instance of the class. /// public DataBase() { - SQLServerAddress = "localhost\\SQLEXPRESS"; + SQLServerAddress = "twine01\\SQLTWINE"; } } } diff --git a/Software/Visual_Studio/Tango.Settings/MachineStudioSettings/MachineStudio.cs b/Software/Visual_Studio/Tango.Settings/MachineStudioSettings/MachineStudio.cs index bfec7af3f..ecaa15153 100644 --- a/Software/Visual_Studio/Tango.Settings/MachineStudioSettings/MachineStudio.cs +++ b/Software/Visual_Studio/Tango.Settings/MachineStudioSettings/MachineStudio.cs @@ -74,7 +74,7 @@ namespace Tango.Settings.MachineStudioSettings StubsModule = new StubsModule(); TechnicianModule = new TechnicianModule(); DeveloperModule = new DeveloperModule(); - UpdateServiceAddress = "http://localhost:65206/MachineStudioUpdateService.svc"; + UpdateServiceAddress = "http://twine01/MachineStudioUpdateService/MachineStudioUpdateService.svc"; } } } -- cgit v1.3.1