Carlos Admirador
unread,Oct 20, 2022, 6:15:37 AM10/20/22Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Sign in to report message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to AltNet-Hispano
Cuál sería una buena práctica para recuperar la IP del cliente, nombre de su equipo (en intranet), navegador (idioma, user agent), dispositivo, resolución, ...?
protected async override void OnAfterRender(bool firstRender)
{
if (firstRender)
{
//var remoteIP = await JSRuntime.InvokeAsync<string>("PortelcoUtil.Context.GetRemoteIP");
var remoteIP = "- desconocida -";
var navegador = await JSRuntime.InvokeAsync<string>("PortelcoUtil.Context.GetBrowserApp");
var userAgent = await JSRuntime.InvokeAsync<string>("PortelcoUtil.Context.GetUserAgent");
var esMovil = await JSRuntime.InvokeAsync<bool>("PortelcoUtil.Context.IsMobile");
var nombreEquipo = esMovil ? "Movil/Tablet" : "PC/Portatil";
httpContext = new string[5] { remoteIP, nombreEquipo, navegador, userAgent, esMovil ? "S" : "N" };
await JSRuntime.InvokeVoidAsync("PortelcoUI.Common.Focus", "form-login");
await JSRuntime.InvokeVoidAsync("PortelcoToolbars.JornadaAtenciones.Parar");
}
}