Skip to content

Commit

Permalink
Merge pull request #26 from hismightiness/Issues/Issue-24
Browse files Browse the repository at this point in the history
Added configuration logic to rollback the MVC version configuration f…
  • Loading branch information
Will Strohl authored Jun 26, 2017
2 parents a429644 + 5543e79 commit 3e133d3
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 1 deletion.
15 changes: 15 additions & 0 deletions WebDeploy/Install/03.00.01.config
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<configuration>
<nodes configfile="Web.config">
<node path="/configuration/runtime/ab:assemblyBinding"
action="update"
collision="save"
targetpath="/configuration/runtime/ab:assemblyBinding/ab:dependentAssembly[ab:assemblyIdentity/@name='System.Web.Mvc'][ab:assemblyIdentity/@publicKeyToken='31bf3856ad364e35']"
nameSpace="urn:schemas-microsoft-com:asm.v1"
nameSpacePrefix="ab">
<dependentAssembly xmlns="urn:schemas-microsoft-com:asm.v1">
<assemblyIdentity name="System.Web.Mvc" publicKeyToken="31bf3856ad364e35" />
<bindingRedirect oldVersion="0.0.0.0-5.1.0.0" newVersion="5.1.0.0"/>
</dependentAssembly>
</node>
</nodes>
</configuration>
16 changes: 15 additions & 1 deletion Website/DesktopModules/Hotcakes/Core/HotcakesController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,10 @@ public string UpgradeModule(string Version)
MakeHccControlPanelDefault();
break;

case "03.00.01":
RevertHotcakesCloudConfig();
break;

default:
break;
}
Expand Down Expand Up @@ -171,7 +175,7 @@ private void MergeFileUpdated()
}

/// <summary>
/// Update config file. This settings needs to be changed for Azure environment
/// Update config file. This settings needs to be changed for Windows Azure Pack environment
/// where trial sites created. Trial sites not working without MVC dll's binding redirect
/// setting.
/// </summary>
Expand All @@ -185,6 +189,16 @@ private void UpdateConfigFile()
}
}

private void RevertHotcakesCloudConfig()
{
if (Environment.MachineName.ToUpper().Contains("CSITES-"))
{
var intallFolderPath = "~/DesktopModules/Hotcakes/Core/Install/";
var configPath = HttpContext.Current.Server.MapPath(intallFolderPath + "03.00.01.config");
ExecuteXmlMerge(configPath);
}
}

private void MigrateAvalaraTaxProviderSetting()
{
// 1.10.0: Avalara tax provider implementation has been changed for tax provider approach where end user can create their own tax provider any time.
Expand Down

0 comments on commit 3e133d3

Please sign in to comment.