diff options
| author | Roy Ben-Shabat <Roy@Twine-s.com> | 2018-02-25 15:14:20 +0200 |
|---|---|---|
| committer | Roy Ben-Shabat <Roy@Twine-s.com> | 2018-02-25 15:14:20 +0200 |
| commit | e83057fa22e28c5fd231ae06a5a91464a6e3f596 (patch) | |
| tree | 3bbfb628ae8015405d35fcec2d5c00eae9d15b0d /Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UpdateService | |
| parent | 5d883d4f6bd18ca80fe26b25ed04dc01d7544371 (diff) | |
| download | Tango-e83057fa22e28c5fd231ae06a5a91464a6e3f596.tar.gz Tango-e83057fa22e28c5fd231ae06a5a91464a6e3f596.zip | |
Integrated DB & MSUS to Twine Server.
Diffstat (limited to 'Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UpdateService')
3 files changed, 21 insertions, 5 deletions
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 @@ </ItemGroup> <ItemGroup> <Content Include="packages.config" /> + <None Include="Properties\PublishProfiles\CustomProfile.pubxml" /> + <None Include="Properties\PublishProfiles\CustomProfile1.pubxml" /> + <None Include="Properties\PublishProfiles\CustomProfile2.pubxml" /> <None Include="Properties\PublishProfiles\FolderProfile.pubxml" /> <None Include="Web.Debug.config"> <DependentUpon>Web.config</DependentUpon> 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 @@ </configSections> <appSettings> <add key="aspnet:UseTaskFriendlySynchronizationContext" value="true" /> - <add key="FtpHost" value="localhost" /> - <add key="UserName" value="Tango" /> + <add key="FtpHost" value="Twine01" /> + <add key="UserName" value="FTPWriter" /> <add key="Password" value="Aa123456" /> </appSettings> <system.web> @@ -21,7 +21,7 @@ <!-- To avoid disclosing metadata information, set the values below to false before deployment --> <serviceMetadata httpGetEnabled="true" httpsGetEnabled="true" /> <!-- To receive exception details in faults for debugging purposes, set the value below to true. Set to false before deployment to avoid disclosing exception information --> - <serviceDebug includeExceptionDetailInFaults="false" /> + <serviceDebug includeExceptionDetailInFaults="true" /> </behavior> </serviceBehaviors> </behaviors> |
