I am using GW client version 7 and GW API with C#.
Is there a way to see what is the status of the login (failed or successful) and attempt login again.
My code below works fine until there is a problem connecting to GW Server (I take the machine offline to test for this).
Application stops at this line:
Code:
Account account = (Account)gwApp.Login(ConfigurationManager.AppSettings["GWUserId"], null, ConfigurationManager.AppSettings["GWUserPassword"], null, null);
No exceptions are generated. It just stops there for good.
Any help greatly appreciated.
Thanks.


Code:
private Account LogIn()
        {
            Application2 gwApp = new Application2();
            LogWriter.Write("Testing with GW version: " + gwApp.MajorVersion+"."+gwApp.MinorVersion);
            try
            {
                Account account = (Account)gwApp.Login(ConfigurationManager.AppSettings["GWUserId"], null, ConfigurationManager.AppSettings["GWUserPassword"], null, null);
                return account;
            }
            catch (Exception e)
                {
                    LogWriter.Write("Error:::: "+e+" ::::");
                    return null;
                }
        }