public void Logout()
 {
     using (AuthenticationServiceClient proxy = new AuthenticationServiceClient())
     {
         proxy.Logout();
     }
 }
        public void Logout()
        {
            AuthenticationServiceClient client = new AuthenticationServiceClient();
            OperationContextScope       scope  = new OperationContextScope(client.InnerChannel);
            var prop = new HttpRequestMessageProperty();

            prop.Headers.Add(HttpRequestHeader.Cookie, ModelLocator.getInstance().SessionModel.SessionCookie);
            OperationContext.Current.OutgoingMessageProperties[HttpRequestMessageProperty.Name] = prop;

            try
            {
                client.Logout();
                mResponder.LogoutResult();
            }
            catch (FaultException <ONyRFaultException> ex)
            {
                mResponder.LogoutFault((ErrorCode)ex.Detail.ErrorCode);
            }
            catch (Exception)
            {
                mResponder.LogoutFault(ErrorCode.NonONyRError);
            }
            finally
            {
                if (client != null)
                {
                    client.Close();
                }
            }
        }