aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UpdateService
diff options
context:
space:
mode:
Diffstat (limited to 'Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UpdateService')
-rw-r--r--Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UpdateService/MachineStudioUpdateService.svc.cs19
-rw-r--r--Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UpdateService/Properties/PublishProfiles/Publish To Twine Local Via FTP.pubxml21
-rw-r--r--Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UpdateService/Tango.MachineStudio.UpdateService.csproj2
-rw-r--r--Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UpdateService/Web.Debug.config5
-rw-r--r--Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UpdateService/Web.Release.config5
-rw-r--r--Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UpdateService/Web.config22
6 files changed, 65 insertions, 9 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 9b03cda30..4438ad188 100644
--- a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UpdateService/MachineStudioUpdateService.svc.cs
+++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UpdateService/MachineStudioUpdateService.svc.cs
@@ -30,6 +30,8 @@ namespace Tango.MachineStudio.UpdateService
public String Comments { get; set; }
+ public bool ForcedUpdate { get; set; }
+
public String FilePath { get; set; }
}
@@ -48,7 +50,7 @@ namespace Tango.MachineStudio.UpdateService
{
CheckForUpdatesResponse response = new CheckForUpdatesResponse();
- using (ObservablesContext db = ObservablesContext.CreateDefaultForWeb())
+ using (ObservablesContext db = ObservablesContext.CreateDefault(GetServerAddress()))
{
db.Configuration.LazyLoadingEnabled = false;
@@ -98,7 +100,7 @@ namespace Tango.MachineStudio.UpdateService
{
UploadVersionResponse response = new UploadVersionResponse();
- using (ObservablesContext db = ObservablesContext.CreateDefaultForWeb())
+ using (ObservablesContext db = ObservablesContext.CreateDefault(GetServerAddress()))
{
db.Configuration.LazyLoadingEnabled = false;
@@ -134,6 +136,7 @@ namespace Tango.MachineStudio.UpdateService
{
UserGuid = user.Guid,
Comments = request.Comments,
+ ForcedUpdate = request.ForcedUpdate,
Token = response.Token,
Version = request.Version,
FilePath = response.FilePath,
@@ -169,7 +172,7 @@ namespace Tango.MachineStudio.UpdateService
{
_pendingUploads.RemoveAll(x => x.Token == upload.Token);
- using (ObservablesContext db = ObservablesContext.CreateDefaultForWeb())
+ using (ObservablesContext db = ObservablesContext.CreateDefault(GetServerAddress()))
{
db.Configuration.LazyLoadingEnabled = false;
@@ -178,7 +181,8 @@ namespace Tango.MachineStudio.UpdateService
Comments = upload.Comments,
FtpFilePath = upload.FilePath,
UserGuid = upload.UserGuid,
- Version = upload.Version
+ Version = upload.Version,
+ ForceUpdate = upload.ForcedUpdate,
});
db.SaveChanges();
@@ -200,7 +204,7 @@ namespace Tango.MachineStudio.UpdateService
{
try
{
- using (ObservablesContext db = ObservablesContext.CreateDefaultForWeb())
+ using (ObservablesContext db = ObservablesContext.CreateDefault(GetServerAddress()))
{
return db.MachineStudioVersions.FirstOrDefault().Version;
}
@@ -210,5 +214,10 @@ namespace Tango.MachineStudio.UpdateService
throw new FaultException(ex.ToString());
}
}
+
+ private String GetServerAddress()
+ {
+ return ConfigurationManager.AppSettings["ServerAddress"].ToString();
+ }
}
}
diff --git a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UpdateService/Properties/PublishProfiles/Publish To Twine Local Via FTP.pubxml b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UpdateService/Properties/PublishProfiles/Publish To Twine Local Via FTP.pubxml
new file mode 100644
index 000000000..64a875aa4
--- /dev/null
+++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UpdateService/Properties/PublishProfiles/Publish To Twine Local Via FTP.pubxml
@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+This file is used by the publish/package process of your Web project. You can customize the behavior of this process
+by editing this MSBuild file. In order to learn more about this please visit https://go.microsoft.com/fwlink/?LinkID=208121.
+-->
+<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <PropertyGroup>
+ <WebPublishMethod>FTP</WebPublishMethod>
+ <LastUsedBuildConfiguration>Release</LastUsedBuildConfiguration>
+ <LastUsedPlatform>Any CPU</LastUsedPlatform>
+ <SiteUrlToLaunchAfterPublish />
+ <LaunchSiteAfterPublish>True</LaunchSiteAfterPublish>
+ <ExcludeApp_Data>False</ExcludeApp_Data>
+ <publishUrl>twine01</publishUrl>
+ <DeleteExistingFiles>False</DeleteExistingFiles>
+ <FtpPassiveMode>True</FtpPassiveMode>
+ <FtpSitePath />
+ <UserName>MachineStudioUpdateService|Roy</UserName>
+ <_SavePWD>True</_SavePWD>
+ </PropertyGroup>
+</Project> \ No newline at end of file
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 08d40b49a..8dc2d264e 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,7 +81,7 @@
</ItemGroup>
<ItemGroup>
<Content Include="packages.config" />
- <None Include="Properties\PublishProfiles\Twine Local Via FTP.pubxml" />
+ <None Include="Properties\PublishProfiles\Publish To Twine Local Via FTP.pubxml" />
<None Include="Web.Debug.config">
<DependentUpon>Web.config</DependentUpon>
</None>
diff --git a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UpdateService/Web.Debug.config b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UpdateService/Web.Debug.config
index fae9cfefa..0b30d99e4 100644
--- a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UpdateService/Web.Debug.config
+++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UpdateService/Web.Debug.config
@@ -14,6 +14,11 @@
xdt:Transform="SetAttributes" xdt:Locator="Match(name)"/>
</connectionStrings>
-->
+
+ <appSettings>
+ <add key="ServerAddress" value="localhost\SQLEXPRESS" />
+ </appSettings>
+
<system.web>
<!--
In the example below, the "Replace" transform will replace the entire
diff --git a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UpdateService/Web.Release.config b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UpdateService/Web.Release.config
index d2da57796..1c52b9ab5 100644
--- a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UpdateService/Web.Release.config
+++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UpdateService/Web.Release.config
@@ -14,6 +14,11 @@
xdt:Transform="SetAttributes" xdt:Locator="Match(name)"/>
</connectionStrings>
-->
+
+ <appSettings>
+ <add key="ServerAddress" value="localhost\SQLTWINE" />
+ </appSettings>
+
<system.web>
<!--<compilation xdt:Transform="RemoveAttributes(debug)" />-->
<!--
diff --git a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UpdateService/Web.config b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UpdateService/Web.config
index 276756b0e..6fd5e637f 100644
--- a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UpdateService/Web.config
+++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UpdateService/Web.config
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8"?>
+<?xml version="1.0" encoding="utf-8"?>
<configuration>
<configSections>
<!-- For more information on Entity Framework configuration, visit http://go.microsoft.com/fwlink/?LinkID=237468 -->
@@ -6,15 +6,31 @@
</configSections>
<appSettings>
<add key="aspnet:UseTaskFriendlySynchronizationContext" value="true" />
+ <add key="ServerAddress" value="localhost\SQLTWINE" />
<add key="FtpHost" value="Twine01" />
- <add key="UserName" value="FTPWriter" />
+ <add key="UserName" value="MachineStudio|FTPWriter" />
<add key="Password" value="Aa123456" />
</appSettings>
<system.web>
- <compilation debug="true" targetFramework="4.6" />
+ <compilation debug="true" targetFramework="4.6">
+ <assemblies>
+ <remove assembly="Tango.Video" />
+ </assemblies>
+ </compilation>
<httpRuntime targetFramework="4.6" />
</system.web>
<system.serviceModel>
+ <bindings>
+ <basicHttpBinding>
+ <binding name="LongTimeoutHttpBinding" receiveTimeout="00:01:00" />
+ </basicHttpBinding>
+ </bindings>
+ <services>
+ <service name="Tango.MachineStudio.UpdateService.MachineStudioUpdateService">
+ <endpoint address="" binding="basicHttpBinding" bindingConfiguration="LongTimeoutHttpBinding"
+ name="" contract="Tango.MachineStudio.Common.Update.IMachineStudioUpdateService" />
+ </service>
+ </services>
<behaviors>
<serviceBehaviors>
<behavior>