Example #1
0
        protected void Page_Load(object sender, EventArgs e)
        {
            string passportRoot = _Request.Get("passportroot", Method.Post);

            if (string.IsNullOrEmpty(passportRoot))
            {
                ShowError("请填写Passport服务器地址");
                return;
            }

            bool success;
            string errMsg = string.Empty;

            using (ErrorScope es = new ErrorScope())
            {
                PassportClientConfig setting = new PassportClientConfig();

                success = setting.TestPassportService(passportRoot, 5000);

                if (es.HasUnCatchedError)
                {
                    CatchError<ErrorInfo>(delegate(ErrorInfo error)
                    {
                        ShowError(error);
                        return;
                        //errMsg += error.Message;
                    });
                }
            }

            if (success)
                ShowSuccess("Passport服务器通讯正常!");
            else
                ShowError("无法连接" + passportRoot + "上的Passport服务!");
        }
Example #2
0
        public object Clone()
        {
            PassportClientConfig config = new PassportClientConfig();

            config.AccessKey       = this.AccessKey;
            config.ClientID        = this.ClientID;
            config.EnablePassport  = this.EnablePassport;
            config.PassportRoot    = this.PassportRoot;
            config.PassportTimeout = this.PassportTimeout;

            return(config);
        }
Example #3
0
        public object Clone()
        {
            PassportClientConfig config = new PassportClientConfig();
            config.AccessKey = this.AccessKey;
            config.ClientID = this.ClientID;
            config.EnablePassport = this.EnablePassport;
            config.PassportRoot = this.PassportRoot;
            config.PassportTimeout = this.PassportTimeout;

            return config;
        }