diff --git a/src/Orchard.Azure/Orchard.Azure.Web/Config/Host.config b/src/Orchard.Azure/Orchard.Azure.Web/Config/Host.config index 008324024..7b6441f6c 100644 --- a/src/Orchard.Azure/Orchard.Azure.Web/Config/Host.config +++ b/src/Orchard.Azure/Orchard.Azure.Web/Config/Host.config @@ -7,9 +7,14 @@ + + + + + diff --git a/src/Orchard.Web/Modules/Orchard.Azure/Orchard.Azure.csproj b/src/Orchard.Web/Modules/Orchard.Azure/Orchard.Azure.csproj index 980749087..f7282d19c 100644 --- a/src/Orchard.Web/Modules/Orchard.Azure/Orchard.Azure.csproj +++ b/src/Orchard.Web/Modules/Orchard.Azure/Orchard.Azure.csproj @@ -69,6 +69,10 @@ False ..\..\..\..\lib\windowsazure\Microsoft.WindowsAzure.Diagnostics.StorageUtility.dll + + False + ..\..\..\..\lib\windowsazure\Microsoft.WindowsAzure.ServiceRuntime.dll + False ..\..\..\..\lib\windowsazure\Microsoft.WindowsAzure.Storage.dll @@ -84,6 +88,7 @@ + @@ -97,6 +102,10 @@ {6e444ff1-a47c-4cf6-bb3f-507c8ebd776d} Orchard.OutputCache + + {3f72a4e9-7b72-4260-b010-c16ec54f9baf} + Orchard.TaskLease + diff --git a/src/Orchard.Web/Modules/Orchard.Azure/Services/TaskLease/AzureMachineNameProvider.cs b/src/Orchard.Web/Modules/Orchard.Azure/Services/TaskLease/AzureMachineNameProvider.cs new file mode 100644 index 000000000..57d260bc8 --- /dev/null +++ b/src/Orchard.Web/Modules/Orchard.Azure/Services/TaskLease/AzureMachineNameProvider.cs @@ -0,0 +1,16 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using Microsoft.WindowsAzure.ServiceRuntime; +using Orchard.TaskLease.Services; + +namespace Orchard.Azure.Services.TaskLease +{ + public class AzureMachineNameProvider : IMachineNameProvider + { + public string GetMachineName() + { + return RoleEnvironment.CurrentRoleInstance.Id; + } + } +} \ No newline at end of file