ASP - usuario de red

 
Vista:

usuario de red

Publicado por xx (2 intervenciones) el 01/12/2001 18:32:24
Como puedo conseguir el usuario de red en asp por medio de una pagina .

Valora esta pregunta
Me gusta: Está pregunta es útil y esta claraNo me gusta: Está pregunta no esta clara o no es útil
0
Responder

RE:usuario de red

Publicado por Miguel (8 intervenciones) el 03/12/2001 04:28:30
Primero asegurate que en el IIS tienes activada la casilla de Propiedades>Seguridad> Autentificacion de windows y luego solo necesitas este codigo.

If Request.ServerVariables("LOGON_USER") = "" Then
' fn_msgbox("No se ha identificado usuario")
Response.Status = "401 Access Denied"
' Session.Abandon
Response.End
Else
Session("LOGON_USER") = Request.ServerVariables("LOGON_USER")
' the following lines strip out an NT domain from the user name
If InStr(Session("LOGON_USER"),"\") then
Session("LOGON_USER") = _
Right(Session("LOGON_USER"), _
Len(Session("LOGON_USER")) - _
InStr(Session("LOGON_USER"),"\"))
End If
End If
Valora esta respuesta
Me gusta: Está respuesta es útil y esta claraNo me gusta: Está respuesta no esta clara o no es útil
0
Comentar