public HttpResponseMessage Post(dynamic DynamicClass)
        {
            HttpResponseMessage httpResponse = new HttpResponseMessage();

            string Input = JsonConvert.SerializeObject(DynamicClass);

            dynamic data = JObject.Parse(Input);

            if (data.Usuario == "")
            {
                httpResponse = ManejoMensajes.RetornaMensajeParametroVacio(httpResponse, EnumMensajes.Parametro_vacio_o_invalido, "Usuario");
            }
            else if (data.Clave == "")
            {
                httpResponse = ManejoMensajes.RetornaMensajeParametroVacio(httpResponse, EnumMensajes.Parametro_vacio_o_invalido, "Clave");
            }
            else
            {
                try
                {
                    string           usuario = data.Usuario;
                    string           clave   = data.Clave;
                    Entidad.Usuarios us      = new Entidad.Usuarios();

                    bool correcto = Membership.ValidateUser(usuario, clave);
                    if (correcto)
                    {
                        //obtenemos al usuario
                        MembershipUser user = Membership.GetUser(usuario);
                        if (user != null)
                        {
                            //datos propios
                            us.Emmail        = user.Email;
                            us.NombreUsuario = user.UserName;
                            us.Aprobado      = user.IsApproved;
                            //******************************************
                            ProfileBase prof  = ProfileBase.Create(usuario);
                            string[]    roles = Roles.GetRolesForUser(usuario);
                            if (prof != null)
                            {
                                //asociar los elementos necesarios
                                us.EncoId          = (int)prof.GetPropertyValue("EncoId");
                                us.Rut             = (string)prof.GetPropertyValue("Rut");
                                us.Nombres         = (string)prof.GetPropertyValue("Nombres");
                                us.ApellidoPaterno = (string)prof.GetPropertyValue("ApellidoPaterno");
                                us.ApellidoMaterno = (string)prof.GetPropertyValue("ApellidoMaterno");
                                us.Direccion       = (string)prof.GetPropertyValue("Direccion");
                                us.RestoDireccion  = (string)prof.GetPropertyValue("RestoDireccion");
                                us.TelefonoFijo    = (string)prof.GetPropertyValue("TelefonoFijo");
                                us.TelefonoCelular = (string)prof.GetPropertyValue("TelefonoCelular");
                                us.Estamento       = (string)prof.GetPropertyValue("Estamento");
                                us.Contratante     = (string)prof.GetPropertyValue("Contratante");
                                us.IdRegion        = (int)prof.GetPropertyValue("IdRegion");
                                us.IdComuna        = (int)prof.GetPropertyValue("IdComuna");
                                us.VeReportes      = (bool)prof.GetPropertyValue("VeReportes");
                                us.NombreCompleto  = us.Nombres + " " + us.ApellidoPaterno + " " + us.ApellidoMaterno;
                            }
                            if (us.VeReportes)
                            {
                                us.VeReportesTexto = "Si";
                            }
                            else
                            {
                                us.VeReportesTexto = "No";
                            }
                            //obtención de la region
                            RayenSalud.WebLun.Entidad.Territorio.Region region = RayenSalud.WebLun.Negocio.Territorio.Territorio.ObtenerRegionPorId(us.IdRegion);
                            if (region != null)
                            {
                                us.NombreRegion = region.Nombre;
                            }
                            RayenSalud.WebLun.Entidad.Territorio.Comuna comuna = RayenSalud.WebLun.Negocio.Territorio.Territorio.ObtenerComunaPorId(us.IdComuna);
                            if (comuna != null)
                            {
                                us.NombreComuna = comuna.Nombre;
                            }
                            RayenSalud.WebLun.Entidad.Global.ContratanteLun contratante = new RayenSalud.WebLun.Entidad.Global.ContratanteLun();
                            //obtenemos el contratante por el nombre
                            if (us.EncoId > 0)
                            {
                                contratante = RayenSalud.WebLun.Negocio.Global.Global.ObtenerContratanteLunPorId(us.EncoId);
                            }

                            if (contratante != null)
                            {
                                us.Contratante = contratante.RazonSocial;
                            }

                            us.RolesUsuarios = roles;
                            if (roles != null)
                            {
                                if (roles.Length > 0)
                                {
                                    us.RolUsuario = roles[0];
                                }
                            }



                            httpResponse = ManejoMensajes.RetornaMensajeCorrecto(httpResponse, us);
                        }
                        else
                        {
                            httpResponse = ManejoMensajes.RetornaMensajeError(httpResponse, EnumMensajes.Usuario_no_existe);
                        }
                    }
                    else
                    {
                        httpResponse = ManejoMensajes.RetornaMensajeError(httpResponse, EnumMensajes.Clave_incorrecta);
                    }
                }
                catch (Exception ex)
                {
                    Negocio.Utiles.NLogs(ex);
                    httpResponse = ManejoMensajes.RetornaMensajeExcepcion(httpResponse, ex);
                }
            }
            return(httpResponse);
        }