Ver Mensaje Individual
  #6 (permalink)  
Antiguo 17/11/2010, 03:31
ZeusXXL
 
Fecha de Ingreso: enero-2010
Ubicación: Madrid
Mensajes: 18
Antigüedad: 14 años, 2 meses
Puntos: 0
Respuesta: Error a iniciar un formulario con imagenbutton

Cita:
Iniciado por jaullo Ver Mensaje
Revisa aca
string HostName = System.Net.Dns.GetHostByAddressRequest.UserHostAdd ress).HostName
Tienes un parentesis que no deberia estar.

Para obtener el host podrias usar
System.Net.Dns.GetHostName
El codigo tiene el parentesis al copia lo copie mal

string IP = Request.UserHostAddress;
string HostName = System.Net.Dns.GetHostByAddress(Request.UserHostAd d ress).HostName; Online online = new Online();

Guardamos la conexión
online.idasociado = asociado.id;
online.ip = IP;
online.host = HostName;
online.ultimo_acceso = DateTime.Now;
_gestionOnline.Insertar(online);

Lo que necesito es recoger el nombre de la maquina que hace la peticion.