public async Task <IActionResult> OnGetAsync()
        {
            var token = HttpContext.Session.GetString("token");

            Owner = User.Claims.Where(x => x.Type == "Owner").Select(x => x.Value).SingleOrDefault();
            if (token == null || token == "" || token == "null" || Owner == null)
            {
                return(RedirectToPage("/logout"));
            }
            Confirmant       = User.Claims.Where(x => x.Type == "Confirmant").Select(x => x.Value).SingleOrDefault();
            Participant      = User.Claims.Where(x => x.Type == "Participant").Select(x => x.Value).SingleOrDefault();
            Country          = User.Claims.Where(x => x.Type == "Country").Select(x => x.Value).SingleOrDefault();
            Discriminator    = User.Claims.Where(x => x.Type == "Discriminator").Select(x => x.Value).SingleOrDefault();
            TipoParticipante = Participant;
            if (Participant == "DEBTOR")
            {
                NRol = 1;
            }
            else if (Participant == "SUPPLIER")
            {
                NRol = 2;
            }

            registrarClienteTF.User               = new User();
            registrarClienteTF.Registrarse        = new PesonProfile();
            registrarClienteTF.User.Participant   = Participant;
            registrarClienteTF.User.Discriminator = Discriminator;

            if (HttpContext.Session.GetString("CountryPerfil") == null || HttpContext.Session.GetString("CountryPerfil") == "null" || HttpContext.Session.GetString("CountryPerfil") == "")
            {
                registrarClienteTF.DataPaises = await _globalService.ConsultasAsociadosTF(new ParamCountry { Id = Int32.Parse(Request.Cookies["Country"]) });

                HttpContext.Session.SetString("CountryPerfil", JsonConvert.SerializeObject(registrarCliente.DataPaises));
            }
            else
            {
                registrarClienteTF.DataPaises = JsonConvert.DeserializeObject <ListCountry>(HttpContext.Session.GetString("CountryPerfil"));
            }

            filterInvoice PeopleId = new filterInvoice();

            PeopleId.Id = Owner;
            registrarClienteTF.Perfil = await _peopleService.ConsultaAsociados(new ParamProspecto { Filter = PeopleId, Country = int.Parse(Country) });

            if (registrarClienteTF.Perfil.Error == null)
            {
                var id = User.Claims.Where(x => x.Type == "Id").Select(x => x.Value).SingleOrDefault();
                var l  = await _aS.RefreshToken(id, CultureInfo.CurrentCulture.Name, Participant, token, Confirmant);

                if (l.Error == null)
                {
                    HttpContext.Session.SetString("token", l.Token);
                }
            }
            RellenarPerfil();
            registrarClienteTF.AuthRol = (await _AuthorizationService.AuthorizeAsync(User, "PolicyProfileChange")).Succeeded;
            registroJson = JsonConvert.SerializeObject(registrarClienteTF);
            return(Page());
        }