Exemplo n.º 1
0
        private Boolean loginComplete()
        {
            TimeSpan TIMEOUT = new TimeSpan(0, 10, 0);                  // 10 min timeout dersom det ikke er noe svar fra serveren
            BasicHttpBinding basicBinding = new BasicHttpBinding();
            basicBinding.SendTimeout = TIMEOUT;
            basicBinding.OpenTimeout = TIMEOUT;

            //setter opp WCF forbindelsen til WebServicen
            client = new ServicePortTypeClient(basicBinding, new EndpointAddress("http://localhost:8080/MainService/services/Service?wsdl"));

            //bruker WebServicen til å autentisere login dataene.
            if (client.Authenticate(UserName.Text, Password.Text))
            {
                return true;
            }
            return false;
        }
Exemplo n.º 2
0
 public MainForm(ServicePortTypeClient client, String Username)
 {
     this.client = client;
     this.Username = Username;
     InitializeComponent();
 }