Exemple #1
0
        public bool IsLoggedOn(string sessionId)
        {
            bool response = false;

            using (SessionPortClient serviceProxy = new SessionPortClient())
            {
                try
                {
                    // dont need audit messages as this method is being hit every few minutes
                    SessionInfo sesInfo = serviceProxy.getSessionInfo(sessionId);
                    if (sesInfo != null)
                    {
                        //both sessions should match
                        response = sesInfo.SessionID.Equals(sessionId, StringComparison.OrdinalIgnoreCase);
                    }
                }
                catch (Exception ex)
                {
                    string x = ex.Message;
                    response = false;
                }
            }
            return(response);
        }