mirror of
https://github.com/OrchardCMS/Orchard.git
synced 2026-02-09 09:16:41 +08:00
Added process ID to machine name.
This commit is contained in:
@@ -1,7 +1,12 @@
|
|||||||
namespace Orchard.Environment {
|
using System;
|
||||||
|
using System.Diagnostics;
|
||||||
|
|
||||||
|
namespace Orchard.Environment {
|
||||||
public class MachineNameProvider : IMachineNameProvider {
|
public class MachineNameProvider : IMachineNameProvider {
|
||||||
public string GetMachineName() {
|
public string GetMachineName() {
|
||||||
return System.Environment.MachineName;
|
// Add process ID to machine name because multiple web servers can
|
||||||
|
// be running on the same physical machine.
|
||||||
|
return String.Format("{0}:{1}", System.Environment.MachineName, Process.GetCurrentProcess().Id);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user