Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
08/23/10 13:07:11 (14 years ago)
Author:
cneumuel
Message:
  • changed Hive.Server WCF services to be configurable in app.config
  • changed endpoints to wsHttpBinding
  • changed project type of Hive.Server.Core to WCF Service Library, so that it can be started directly to be able to test the service (and update references) (#1159)
File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Contracts/3.3/WcfSettings.cs

    r2607 r4285  
    7373    /// </summary>
    7474    /// <returns></returns>
    75     public static string GetActiveIP() {
    76       return System.Net.NetworkInformation.IPGlobalProperties.GetIPGlobalProperties().GetActiveTcpConnections()[0].LocalEndPoint.Address.ToString();
     75    public static IPAddress GetActiveIP() {
     76      //return System.Net.NetworkInformation.IPGlobalProperties.GetIPGlobalProperties().GetActiveTcpConnections()[0].LocalEndPoint.Address.ToString();
     77      IPAddress[] addresses;
     78      addresses = Dns.GetHostAddresses(Dns.GetHostName());
     79      int index = 0;
     80      if (System.Environment.OSVersion.Version.Major >= 6) {
     81        for (index = addresses.Length - 1; index >= 0; index--)
     82          if (addresses[index].AddressFamily == System.Net.Sockets.AddressFamily.InterNetwork)
     83            break;
     84      }
     85      return addresses[index];
    7786    }
    7887
Note: See TracChangeset for help on using the changeset viewer.