From 0346836d35c393881d37f989e3c85a5236439712 Mon Sep 17 00:00:00 2001 From: DW Date: Fri, 5 May 2017 13:57:43 +0300 Subject: [PATCH] Issue #51: Add support localhost (127.0.0.1) host name --- MTApiService/MtServer.cs | 14 +++++++++++--- MTApiService/Properties/AssemblyInfo.cs | 4 ++-- 2 files changed, 13 insertions(+), 5 deletions(-) diff --git a/MTApiService/MtServer.cs b/MTApiService/MtServer.cs index ce39bec8..08a07eb0 100755 --- a/MTApiService/MtServer.cs +++ b/MTApiService/MtServer.cs @@ -62,13 +62,21 @@ namespace MTApiService } //init local pipe host - var localUrl = CreateConnectionAddress(null, port, true); - var localServiceHost = CreateServiceHost(localUrl, true); + var localPipeUrl = CreateConnectionAddress(null, port, true); + var localPipeServiceHost = CreateServiceHost(localPipeUrl, true); + if (localPipeServiceHost != null) + { + _hosts.Add(localPipeServiceHost); + } + + //init localhost + var localUrl = CreateConnectionAddress("localhost", port, false); + var localServiceHost = CreateServiceHost(localUrl, false); if (localServiceHost != null) { _hosts.Add(localServiceHost); } - + //init network hosts var dnsHostName = Dns.GetHostName(); var ips = Dns.GetHostEntry(dnsHostName); diff --git a/MTApiService/Properties/AssemblyInfo.cs b/MTApiService/Properties/AssemblyInfo.cs index a6da8e38..bbe6bdb8 100644 --- a/MTApiService/Properties/AssemblyInfo.cs +++ b/MTApiService/Properties/AssemblyInfo.cs @@ -32,5 +32,5 @@ using System.Runtime.InteropServices; // You can specify all the values or you can default the Build and Revision Numbers // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("1.0.26.0")] -[assembly: AssemblyFileVersion("1.0.26.0")] \ No newline at end of file +[assembly: AssemblyVersion("1.0.27.0")] +[assembly: AssemblyFileVersion("1.0.27.0")] \ No newline at end of file