Notification

Icon
Error

I need query for the currant loged user

Posted: Wednesday, December 31, 2014 7:02:42 AM(UTC)
khaleehh

khaleehh

Member Alpha Tester Original PosterPosts: 11
0
Like
This issue has been solved! Click here to view the solution

Hey , I need to made a page with some informatioms , and this my code ,
I need the statement to shows the logged user name to be showen :




<%@ Page Language="C#" ContentType="text/html" ResponseEncoding="utf-8" %>
<%@ Import Namespace="System.Activities.Expressions" %>
<%@ Import Namespace="System.Data" %>
<%@ Import Namespace="LS" %>
<% LS.User.Current().CheckWebsiteAccess(); %>
<%
var DsAsset = DB.ExecuteObject("web50oneasset", DB.NewDBParameter("@assetid", Request["AssetID"]));
var dsos = DB.ExecuteObject("web50hwos", DB.NewDBParameter("@AssetID", Request["AssetID"]));
var dssystem = DB.ExecuteObject("web50hwsystem", DB.NewDBParameter("@AssetID", Request["AssetID"]));
var dssystemproduct = DB.ExecuteObject("web50hwsystemproduct", DB.NewDBParameter("@AssetID", Request["AssetID"]));
var dsschassis = DB.ExecuteObject("web50hwchassis", DB.NewDBParameter("@AssetID", Request["AssetID"]));
var dsprocessor = DB.ExecuteObject("web50hwprocessor", DB.NewDBParameter("@AssetID", Request["AssetID"]));
var dssound = DB.ExecuteObject("web50hwsound", DB.NewDBParameter("@AssetID", Request["AssetID"]));
var dsvideo = DB.ExecuteObject("web50hwvideo", DB.NewDBParameter("@AssetID", Request["AssetID"]));
var dsdrives = DB.ExecuteObject("web50hwdrives", DB.NewDBParameter("@AssetID", Request["AssetID"]));
var dsbios = DB.ExecuteObject("web50hwbios", DB.NewDBParameter("@AssetID", Request["AssetID"]));
var dsmemory = DB.ExecuteObject("web50hwmemory", DB.NewDBParameter("@AssetID", Request["AssetID"]));
var dsmemoryarray = DB.ExecuteObject("web50hwmemoryarray", DB.NewDBParameter("@AssetID", Request["AssetID"]));
var dsnetwork = DB.ExecuteObject("web50hwnetwork", DB.NewDBParameter("@AssetID", Request["AssetID"]));
var dssoftware = DB.ExecuteObject("web50hwsoftware", DB.NewDBParameter("@AssetID", Request["AssetID"]));
int tel = 1;
%>



<body style="background:#FFFFFF">
<% }%>
<tr>
<td class="lijntje"><span class="bigt" >< The Currant Loged User is: </span> </td>
</tr>
</body>

Daniel.B
#1Daniel.B Member Posts: 1,150  
posted: 1/5/2015 3:53:41 PM(UTC)
The following widget page will show the username which is logged on to the web console:

Code:
<%@ Page Language="C#" AutoEventWireup="true" Inherits="LS.BaseControl" %>
<%@ Import Namespace="System.Data" %>
<%@ Import Namespace="LS" %>
<% Response.CacheControl = "no-cache";%>
<% Response.AddHeader("Pragma", "no-cache"); %>
<% Response.Expires = -1; %>
<%  LS.User.Current().CheckWebsiteAccess(); %>
 

<p>The current logged on user is: <%= LS.User.Current().UserName %> </p>

 
<script type="text/javascript">
    $('#WTitle<%=TabControlID %>', window.top.document).text("Username");
</script>
LJayP
#2LJayP Member Premium Users Posts: 15  
posted: 6/16/2015 1:25:00 PM(UTC)
Is there a way to make it show all logged on users on the web console?

Also can I make the username link to the profile so when you click on the user it will take you to there user asset page on lansweeper?

Thanks Dancing
Daniel.B
#3Daniel.B Member Posts: 1,150  
posted: 6/29/2015 10:53:34 AM(UTC)
Users log on to IIS Express or IIS. Not sure if there is any way to get a list from there.

Active Discussions

Lansweeper Enterprise Options in Menu Bar/Configuration
by  mk@allan   Go to last post Go to first unread
Last post: 6/18/2021 7:38:43 PM(UTC)
Lansweeper No One getting back to me from Lansweeper
by  Kenneth Lindsay  
Go to last post Go to first unread
Last post: 6/18/2021 3:31:06 PM(UTC)
Lansweeper INFO DateTimeService time refresh
by  miharix   Go to last post Go to first unread
Last post: 6/18/2021 10:48:57 AM(UTC)
Lansweeper RPC Unavailable error
by  Greeno  
Go to last post Go to first unread
Last post: 6/17/2021 7:15:07 PM(UTC)
Lansweeper Exclude Search
by  pryan67  
Go to last post Go to first unread
Last post: 6/16/2021 4:01:43 PM(UTC)
Lansweeper Report: All Apple Mac devices with Memory RAM asset
by  gabrielo   Go to last post Go to first unread
Last post: 6/16/2021 3:17:24 PM(UTC)
Lansweeper Does technical support for LS really respond?
by  tosch  
Go to last post Go to first unread
Last post: 6/16/2021 12:48:50 PM(UTC)