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; }
public MainForm(ServicePortTypeClient client, String Username) { this.client = client; this.Username = Username; InitializeComponent(); }