예제 #1
0
        /// <summary>
        /// Logout from a remote Simias server
        /// </summary>
        /// <returns>Simias.Client.Authentication.Status object</returns>
        public Status Logout(Uri webServiceUri, string simiasDataPath)
        {
            Status status = null;

            try
            {
                SimiasWebService simiasSvc = new SimiasWebService();
                simiasSvc.Url = webServiceUri.ToString() + "/Simias.asmx";
                LocalService.Start(simiasSvc, webServiceUri, simiasDataPath);

                DomainInformation cInfo = simiasSvc.GetDomainInformation(this.domainID);
                if (cInfo != null)
                {
                    // Call Simias for a remote domain authentication
                    status = simiasSvc.LogoutFromRemoteDomain(this.domainID);
                }
                else
                {
                    //status = new Simias.Authentication.Status( StatusCodes.UnknownDomain );
                }
            }
            catch (Exception ex)
            {
                // DEBUG
                if (MyEnvironment.Mono)
                {
                    Console.WriteLine("Authentication - caught exception: {0}", ex.Message);
                }

                //status = new Status( StatusCodes.InternalException );
                //status.ExceptionMessage = ex.Message;
            }

            return(status);
        }