protected override bool ReconnectService()
        {
            bool result;

            try
            {
                if (this.ParentService != null)
                {
                    if (this.ParentService.IsValid)
                    {
                        result = true;
                    }
                    else
                    {
                        result = this.ParentService.Challenge();
                    }
                }
                else if (string.IsNullOrEmpty(base.ConnectionURL))
                {
                    result = false;
                }
                else
                {
                    AGSConnection connection = AGSConnection.GetConnection(base.ConnectionURL, base.ConnectionName, base.UserName);
                    if (connection != null)
                    {
                        if (!connection.ConnectionFailed)
                        {
                            if (connection.LoadConnectionProperties())
                            {
                                this.ParentService = new AGSMapService(this.ServiceFullName, base.ConnectionURL, connection);
                                result             = this.ParentService.Challenge();
                            }
                            else
                            {
                                this.ErrorMessage = connection.ErrorMessage;
                                result            = false;
                            }
                        }
                        else
                        {
                            this.ErrorMessage = connection.ErrorMessage;
                            result            = false;
                        }
                    }
                    else
                    {
                        this.ErrorMessage = AfaStrings.ErrorConnectingToServer;
                        result            = false;
                    }
                }
            }
            catch
            {
                this.ErrorMessage = AfaStrings.ErrorConnectingToServer;
                result            = false;
            }
            return(result);
        }