usuarios(cerrar session, macaddres), se corrrigio doble click en login, actualizacion signalR
This commit is contained in:
@@ -72,6 +72,7 @@ Partial Class SessionesActivas
|
||||
dtU.Columns.Add("RemoteIpAddres", System.Type.GetType("System.String"))
|
||||
dtU.Columns.Add("LastPostback", System.Type.GetType("System.DateTime"))
|
||||
dtU.Columns.Add("Modulo", System.Type.GetType("System.String"))
|
||||
dtU.Columns.Add("SessionID", System.Type.GetType("System.String"))
|
||||
Dim dtF As DataTable = dtU.Clone
|
||||
Dim objlist As List(Of ADSSession.ADSSessionObj) = ADSSession.ADSSessionConfig.SessionManager(ADSSession.OpcionSession.getListasession)
|
||||
|
||||
@@ -82,6 +83,7 @@ Partial Class SessionesActivas
|
||||
row("RemoteIpAddres") = user.IpAddres
|
||||
row("LastPostback") = user.LastPostback
|
||||
row("Modulo") = user.Modulo
|
||||
row("Modulo") = user.SessionID
|
||||
dtF.Rows.Add(row.ItemArray())
|
||||
End If
|
||||
Next
|
||||
@@ -105,6 +107,8 @@ Partial Class SessionesActivas
|
||||
e.Row.Cells(2).Attributes.Add("colspan", "4")
|
||||
e.Row.CssClass = "Titulos"
|
||||
e.Row.FCLinkButton("LnkEnviarMensaje").Visible = False
|
||||
e.Row.FCLinkButton("LnkQuitar").Visible = False
|
||||
|
||||
End If
|
||||
' Dim info As ADSSession.GlobalSessionInfo = ADSSession.MySessionInfo.GlobalSessions.FirstOrDefault(Function(M) M.CveUsuario = e.Row.DataKey("CveUsuario").ToEntero() AndAlso M.CveEmpresa = e.Row.DataKey("CveEmpresa").ToEntero())
|
||||
' If IsNothing(info) Then
|
||||
@@ -130,10 +134,56 @@ Partial Class SessionesActivas
|
||||
|
||||
|
||||
Protected Sub LnkQuitar_Click(sender As Object, e As EventArgs)
|
||||
'Dim gvRow As GridViewRow = DirectCast(DirectCast(sender, LinkButton).NamingContainer, GridViewRow)
|
||||
Dim gvRow As GridViewRow = DirectCast(DirectCast(sender, LinkButton).NamingContainer, GridViewRow)
|
||||
'ADSSession.MySessionInfo.GlobalSessions.RemoveAll(Function(M) M.CveUsuario = gvRow.DataKey("CveUsuario").ToEntero())
|
||||
'CargaDatos()
|
||||
Dim cveUsuario As Integer = gvRow.DataKey("CveUsuario").ToEntero()
|
||||
Dim CveEmpresa As Integer = gvRow.DataKey("CveEmpresa").ToEntero()
|
||||
ADSSession.ADSSessionConfig.SessionManager(ADSSession.OpcionSession.CerrarSession, CveEmpresa:=CveEmpresa, CveUsuario:=cveUsuario)
|
||||
'For Each user As ADSSession.ADSSessionObj In objlist
|
||||
' If cveUsuario = user.CveUsuario AndAlso CveEmpresa = user.CveEmpresa Then
|
||||
|
||||
' Dim aspsig As String = user.ASPSIG '"94C6AC57E8599390A4B7B8AB41FEABEF466D9B31120BE06D78110E66265F1ACC5616297BF3B88EDCEE71EBCFE35484308F62C8017EAC29FB3F0FB45CEC09E8F03DFBB4A4DD890D45755B7A30185C6D01F20AEFA74BE3A25FD12D536B20DCB8D9940A3D95"
|
||||
' Dim sessionID As String = user.SessionID
|
||||
' Dim url = ("http://localhost:85/Inicio.aspx?logout=1")
|
||||
' Dim cookie As String = String.Format("ASP.NET_SessionId={0};.ASPXSIG={1}", sessionID, aspsig)
|
||||
' sendURL(url, cookie)
|
||||
' sendURL("http://caudillo:85/Inicio.aspx?logout=1", cookie)
|
||||
' End If
|
||||
'Next
|
||||
|
||||
CargaDatos("")
|
||||
End Sub
|
||||
|
||||
Private Function sendURL(ByVal URL As String, ByVal Optional Cookie As String = "", ByVal Optional maxTimeMilliseconds As Integer = 120000) As String
|
||||
Dim resultado As String = ""
|
||||
|
||||
Try
|
||||
Dim request As Net.HttpWebRequest = CType(Net.HttpWebRequest.Create(URL), Net.HttpWebRequest)
|
||||
request.Timeout = maxTimeMilliseconds
|
||||
request.Method = "POST"
|
||||
request.ContentType = "text/xml; charset=utf-8"
|
||||
|
||||
If Not String.IsNullOrEmpty(Cookie) Then
|
||||
request.Headers.Add("Cookie", Cookie)
|
||||
End If
|
||||
|
||||
Using stream As IO.Stream = request.GetRequestStream()
|
||||
|
||||
Using stmw As IO.StreamWriter = New IO.StreamWriter(stream)
|
||||
stmw.Write("")
|
||||
End Using
|
||||
End Using
|
||||
|
||||
Dim response As Net.WebResponse = CType(request.GetResponse(), Net.WebResponse)
|
||||
Dim sr As IO.StreamReader = New IO.StreamReader(response.GetResponseStream())
|
||||
resultado = sr.ReadToEnd()
|
||||
sr.Close()
|
||||
Catch ex As Exception
|
||||
'Extenciones.ApplicationParameter.GuardaLogEx(ex, $"SOAPAction : {SOAPAction} XML : {xml}")
|
||||
End Try
|
||||
|
||||
Return resultado
|
||||
End Function
|
||||
Protected Sub LnkEnviarMensaje_Click(sender As Object, e As EventArgs)
|
||||
Dim gvRow As GridViewRow = DirectCast(DirectCast(sender, LinkButton).NamingContainer, GridViewRow)
|
||||
RCveUsuario = gvRow.DataKey("CveUsuario")
|
||||
@@ -142,7 +192,7 @@ Partial Class SessionesActivas
|
||||
Protected Sub LnkEnviar_Click(sender As Object, e As EventArgs)
|
||||
|
||||
Dim lista As New List(Of String)
|
||||
lista.Add(RCveUsuario)
|
||||
lista.Add(RCveUsuario)
|
||||
'Notificaciones.AlertaVentana(TxtMensaje.Text, lista)
|
||||
Notificaciones.AlertaVentana(TxtMensaje.Text, lista, timeoutseconds:=0)
|
||||
RegistraScript($"$(""#DivMensaje"").modal('hide');console.log('{Decripta(Context.User.Identity.Name)}')")
|
||||
|
||||
Reference in New Issue
Block a user