public async Task CheckLogin(string user, string password) { try { await Task.Factory.StartNew(() => { client.CheckLogin(user, password); }).ConfigureAwait(false); } catch (SoapException ex) { Console.WriteLine(ex.Message); throw new LoginException("The credentials you entered are incorrect"); } catch (InvalidOperationException ex) { Console.WriteLine(ex.Message); throw new LoginException("The credentials you entered are incorrect"); } }