From 2ab54573d10ca59351100ab8416178be2223fc91 Mon Sep 17 00:00:00 2001 From: Roy Ben-Shabat Date: Wed, 27 Feb 2019 16:49:42 +0200 Subject: Added support for caching on machine studio. --- .../MachineService/MachineStudio_Controller_TST.cs | 30 ++++++++++++++++++++++ 1 file changed, 30 insertions(+) (limited to 'Software/Visual_Studio/Tango.UnitTesting/MachineService') diff --git a/Software/Visual_Studio/Tango.UnitTesting/MachineService/MachineStudio_Controller_TST.cs b/Software/Visual_Studio/Tango.UnitTesting/MachineService/MachineStudio_Controller_TST.cs index 21ab16307..d4585388a 100644 --- a/Software/Visual_Studio/Tango.UnitTesting/MachineService/MachineStudio_Controller_TST.cs +++ b/Software/Visual_Studio/Tango.UnitTesting/MachineService/MachineStudio_Controller_TST.cs @@ -5,6 +5,7 @@ using Tango.BL; using Tango.MachineStudio.Common.Web; using Tango.Transport.Web; using System.Linq; +using System.Configuration; namespace Tango.UnitTesting.MachineService { @@ -74,5 +75,34 @@ namespace Tango.UnitTesting.MachineService Assert.IsFalse(res5.IsUpdateAvailable); } + + [TestMethod] + public void Login_with_new_user() + { + //LoadConfiguration(); + + Tango.MachineService.Controllers.MachineStudioController controller = new Tango.MachineService.Controllers.MachineStudioController(); + + + + controller.Login(new LoginRequest() + { + Email = "Mati@twine-s.com", + Password = "Futo8985", + }); + } + + //private void LoadConfiguration() + //{ + // ExeConfigurationFileMap fileMap = new ExeConfigurationFileMap(); + // fileMap.ExeConfigFilename = @"web.config"; + + // Configuration config = ConfigurationManager.OpenMappedExeConfiguration(fileMap, ConfigurationUserLevel.None); + + // foreach (var item in config.AppSettings.Settings.OfType()) + // { + // ConfigurationManager.AppSettings.Add(item.Key, item.Value); + // } + //} } } -- cgit v1.3.1 From 56b984bf7c4785cd0bcfd45a174ea802c6d0d471 Mon Sep 17 00:00:00 2001 From: Roy Ben-Shabat Date: Mon, 4 Mar 2019 13:48:35 +0200 Subject: Fixed issue with machine service not including exception messages on azure. --- Software/DB/PPC/Tango.mdf | Bin 75497472 -> 75497472 bytes Software/DB/PPC/Tango_log.ldf | Bin 53673984 -> 53673984 bytes .../MachineService/PPC_Controller_TST.cs | 2 +- .../Visual_Studio/Tango.Web/TangoWebApplication.cs | 1 - .../Controllers/PPCController.cs | 1 - .../Web/Tango.MachineService/Global.asax.cs | 2 ++ .../Web/Tango.MachineService/Web.config | 10 ++++++++++ 7 files changed, 13 insertions(+), 3 deletions(-) (limited to 'Software/Visual_Studio/Tango.UnitTesting/MachineService') diff --git a/Software/DB/PPC/Tango.mdf b/Software/DB/PPC/Tango.mdf index bac8a7680..d6f6f7df9 100644 Binary files a/Software/DB/PPC/Tango.mdf and b/Software/DB/PPC/Tango.mdf differ diff --git a/Software/DB/PPC/Tango_log.ldf b/Software/DB/PPC/Tango_log.ldf index fc15dcc93..0d66b5a3b 100644 Binary files a/Software/DB/PPC/Tango_log.ldf and b/Software/DB/PPC/Tango_log.ldf differ diff --git a/Software/Visual_Studio/Tango.UnitTesting/MachineService/PPC_Controller_TST.cs b/Software/Visual_Studio/Tango.UnitTesting/MachineService/PPC_Controller_TST.cs index 7c3d497b8..68232e512 100644 --- a/Software/Visual_Studio/Tango.UnitTesting/MachineService/PPC_Controller_TST.cs +++ b/Software/Visual_Studio/Tango.UnitTesting/MachineService/PPC_Controller_TST.cs @@ -13,7 +13,7 @@ namespace Tango.UnitTesting.MachineService [TestCategory("Machine Service - PPC")] public class PPC_Controller_TST { - private const string address = "http://localhost:51581"; + private const string address = "https://machineservice-test.twine-srv.com"; [TestMethod] public void Login_and_setup() diff --git a/Software/Visual_Studio/Tango.Web/TangoWebApplication.cs b/Software/Visual_Studio/Tango.Web/TangoWebApplication.cs index c9fea1678..f168fe9a4 100644 --- a/Software/Visual_Studio/Tango.Web/TangoWebApplication.cs +++ b/Software/Visual_Studio/Tango.Web/TangoWebApplication.cs @@ -26,7 +26,6 @@ namespace Tango.Web protected virtual void Application_Start() { LogManager.Default.RegisterLogger(new AzureCloudLogger()); - GlobalConfiguration.Configuration.Filters.Add(new LogExceptionFilterAttribute()); } diff --git a/Software/Visual_Studio/Web/Tango.MachineService/Controllers/PPCController.cs b/Software/Visual_Studio/Web/Tango.MachineService/Controllers/PPCController.cs index a2016d4e0..a2c761824 100644 --- a/Software/Visual_Studio/Web/Tango.MachineService/Controllers/PPCController.cs +++ b/Software/Visual_Studio/Web/Tango.MachineService/Controllers/PPCController.cs @@ -65,7 +65,6 @@ namespace Tango.MachineService.Controllers using (ObservablesContext db = ObservablesContextHelper.CreateContext()) { - db.Configuration.LazyLoadingEnabled = false; String machine_guid = RequestToken.Object.MachineGuid; var machine = db.Machines.SingleOrDefault(x => x.Guid == machine_guid); diff --git a/Software/Visual_Studio/Web/Tango.MachineService/Global.asax.cs b/Software/Visual_Studio/Web/Tango.MachineService/Global.asax.cs index 56561e4ce..07d1514eb 100644 --- a/Software/Visual_Studio/Web/Tango.MachineService/Global.asax.cs +++ b/Software/Visual_Studio/Web/Tango.MachineService/Global.asax.cs @@ -21,6 +21,8 @@ namespace Tango.MachineService FilterConfig.RegisterGlobalFilters(GlobalFilters.Filters); RouteConfig.RegisterRoutes(RouteTable.Routes); BundleConfig.RegisterBundles(BundleTable.Bundles); + + GlobalConfiguration.Configuration.IncludeErrorDetailPolicy = IncludeErrorDetailPolicy.Always; } } } diff --git a/Software/Visual_Studio/Web/Tango.MachineService/Web.config b/Software/Visual_Studio/Web/Tango.MachineService/Web.config index 4a694f320..58a8c48af 100644 --- a/Software/Visual_Studio/Web/Tango.MachineService/Web.config +++ b/Software/Visual_Studio/Web/Tango.MachineService/Web.config @@ -48,7 +48,17 @@ + + + + + + + + + + -- cgit v1.3.1