aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/MachineStudio
diff options
context:
space:
mode:
authorRoy Ben-Shabat <Roy@Twine-s.com>2018-02-25 15:14:20 +0200
committerRoy Ben-Shabat <Roy@Twine-s.com>2018-02-25 15:14:20 +0200
commite83057fa22e28c5fd231ae06a5a91464a6e3f596 (patch)
tree3bbfb628ae8015405d35fcec2d5c00eae9d15b0d /Software/Visual_Studio/MachineStudio
parent5d883d4f6bd18ca80fe26b25ed04dc01d7544371 (diff)
downloadTango-e83057fa22e28c5fd231ae06a5a91464a6e3f596.tar.gz
Tango-e83057fa22e28c5fd231ae06a5a91464a6e3f596.zip
Integrated DB & MSUS to Twine Server.
Diffstat (limited to 'Software/Visual_Studio/MachineStudio')
-rw-r--r--Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Publisher/Tango.MachineStudio.Publisher.csproj27
-rw-r--r--Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UpdateService/MachineStudioUpdateService.svc.cs17
-rw-r--r--Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UpdateService/Tango.MachineStudio.UpdateService.csproj3
-rw-r--r--Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UpdateService/Web.config6
4 files changed, 48 insertions, 5 deletions
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 @@
<ProjectTypeGuids>{60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
<WarningLevel>4</WarningLevel>
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
+ <IsWebBootstrapper>false</IsWebBootstrapper>
+ <PublishUrl>publish\</PublishUrl>
+ <Install>true</Install>
+ <InstallFrom>Disk</InstallFrom>
+ <UpdateEnabled>false</UpdateEnabled>
+ <UpdateMode>Foreground</UpdateMode>
+ <UpdateInterval>7</UpdateInterval>
+ <UpdateIntervalUnits>Days</UpdateIntervalUnits>
+ <UpdatePeriodically>false</UpdatePeriodically>
+ <UpdateRequired>false</UpdateRequired>
+ <MapFileExtensions>true</MapFileExtensions>
+ <ApplicationRevision>0</ApplicationRevision>
+ <ApplicationVersion>1.0.0.%2a</ApplicationVersion>
+ <UseApplicationTrust>false</UseApplicationTrust>
+ <BootstrapperEnabled>true</BootstrapperEnabled>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
@@ -135,5 +150,17 @@
<Name>Tango.MachineStudio.Common</Name>
</ProjectReference>
</ItemGroup>
+ <ItemGroup>
+ <BootstrapperPackage Include=".NETFramework,Version=v4.6">
+ <Visible>False</Visible>
+ <ProductName>Microsoft .NET Framework 4.6 %28x86 and x64%29</ProductName>
+ <Install>true</Install>
+ </BootstrapperPackage>
+ <BootstrapperPackage Include="Microsoft.Net.Framework.3.5.SP1">
+ <Visible>False</Visible>
+ <ProductName>.NET Framework 3.5 SP1</ProductName>
+ <Install>false</Install>
+ </BootstrapperPackage>
+ </ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
</Project> \ 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 @@
</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>