private void btnOpenSession_Click(object sender, EventArgs e) { string requestServiceURL = "http://grcdslutil/IDORequestService/RequestService.aspx"; Client client = new Client(requestServiceURL, IDOProtocol.Http); OpenSessionResponseData response = new OpenSessionResponseData(); using (client) { response = client.OpenSession("sldatacollection", "mongoose", "01 DEV GR Mansfield"); if (response.LogonSucceeded) { lblStatus.Text = "Session: OPEN"; lblStatus.Refresh(); MessageBox.Show("Logged in"); } else { lblStatus.Text = "Session: CLOSED"; lblStatus.Refresh(); MessageBox.Show("An Error occurred. Logged out"); } MessageBox.Show("About To Close Session"); client.CloseSession(); lblStatus.Text = "Session: CLOSED"; } }
public void Logout() { _sessionInfo = null; _client.CloseSession(); }
public void Login(SLConfiguration config) { _sessionInfo = _client.OpenSession(_user, _password, config.Database); if (!SessionInfo.LogonSucceeded) throw new Exception(SessionInfo.AdditionalFailureInformation); }