Free cookie consent management tool by TermsFeed Policy Generator

Changeset 2103 for trunk/sources


Ignore:
Timestamp:
06/25/09 15:09:18 (15 years ago)
Author:
mbecirov
Message:

#586: Handling of exceptions when user enters a wrong IP or Port at Login

Location:
trunk/sources/HeuristicLab.Hive.Server.Console/3.2
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Hive.Server.Console/3.2/HiveServerConsole.cs

    r2065 r2103  
    3434using System.Net;
    3535using System.Threading;
     36using System.ServiceModel;
    3637
    3738namespace HeuristicLab.Hive.Server.ServerConsole {
     
    4647      tbIp.Text = "10.20.53.1";
    4748      tbPort.Text = WcfSettings.GetDefaultPort().ToString();
    48       tbUserName.Text = "test45";
    49       tbPwd.Text = "test";
     49      tbUserName.Text = "admin";
     50      tbPwd.Text = "admin";
    5051#endif
    5152    }
     
    8687        IPAddress ipAdress = IPAddress.Parse(tbIp.Text);
    8788        int port = int.Parse(tbPort.Text);
     89        ServiceLocator.Address = tbIp.Text.Replace(" ", "");
     90        ServiceLocator.Port = tbPort.Text;
    8891        IServerConsoleFacade scf = ServiceLocator.GetServerConsoleFacade();
    8992        try {
     
    9598          lblError.Text = resp.StatusMessage;
    9699        }
    97         catch (Exception ex) {
     100        catch (EndpointNotFoundException ene) {
     101          lblError.Text = "No Service at this address!";
     102        }
     103        catch (FaultException ex) {
    98104          //login failed
    99105          lblError.Text = "Logon failed!";
  • trunk/sources/HeuristicLab.Hive.Server.Console/3.2/ServiceLocator.cs

    r1723 r2103  
    3434            WcfSettings.GetBinding(),
    3535            new EndpointAddress("net.tcp://" + Address + ":" + Port + "/HiveServerConsole/ServerConsoleFacade"));
    36 
     36                         
    3737        serverConsoleFacade = factory.CreateChannel();
    3838      }
    39 
     39     
    4040      return serverConsoleFacade;
    4141    }
Note: See TracChangeset for help on using the changeset viewer.