diff options
Diffstat (limited to 'Software/Visual_Studio/Web/Tango.MachineService')
3 files changed, 12 insertions, 1 deletions
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 @@ <authentication mode="Forms"> <forms defaultUrl="/Downloads/Index" loginUrl="/Account/Login" slidingExpiration="true" timeout="30"></forms> </authentication> + + <customErrors mode="On"/> </system.web> + + <!-- Override it for paths starting with api (your WebAPI) --> + <location path="api"> + <system.web> + <customErrors mode="Off" /> + </system.web> + </location> + <system.webServer> <handlers> <remove name="ExtensionlessUrlHandler-Integrated-4.0" /> |
