public void Login(LoginData credentials) { boConnection = new Connection(credentials.Url); boSession = new Session_(boConnection); if (credentials.Proxy != null && !String.IsNullOrEmpty(credentials.Proxy.Host)) { boConnection.Proxy = credentials.Proxy.ToWebProxy(); } EnterpriseCredential boEnterpriseCredential = new EnterpriseCredential(); boEnterpriseCredential.Domain = credentials.Domain; boEnterpriseCredential.Login = credentials.Login; boEnterpriseCredential.Password = credentials.Password; boEnterpriseCredential.AuthType = credentials.AuthType; boSessionInfo = boSession.Login(boEnterpriseCredential); boSessionId = boSessionInfo.SessionID; }