LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

win-login on web-server

We have a corporate network with Active Directory.
I'm developing an application using the LabVIEW Web server.
When a user opens the page of my server, he sees certain information. I want this information to depend on user's login.
In C# (.NET), it's easy to get a user's win-login without password entry forms. For example, we have a corporate website. When I open it, I immediately get into my personal office without any authorization. Is there a way in LabVIEW to find out which user (his login) is accessing the page? Using this information, I can extract the necessary data from Active Directory and display it on the page.

0 Kudos
Message 1 of 4
(2,567 Views)

Good morning! 

 

If I understand the problem correctly, all you're looking for is the username from their login on the computer, not the full username and password, correct?

 

If that is the case, I dug up a support article covering the retrieval of a Windows Username using the Systems Exec VI or through a Property Node.

 

Retrieve Windows User Name in LabVIEW Programmatically:

Linkhttps://knowledge.ni.com/KnowledgeArticleDetails?id=kA00Z000000PACwSAO

Tyler O.
Applications Engineer
National Instruments
0 Kudos
Message 2 of 4
(2,527 Views)

Hi, Tyler!

I can't use Systems Exec.

I need get data from intertnet-request

lvweb.png

0 Kudos
Message 3 of 4
(2,521 Views)

I founded solution like

<script type="text/javascript">
  var WinNetwork = new ActiveXObject("WScript.Network");
 var UD = WinNetwork.UserName; 
 document.getElementById("gf").href = ".../get_form/?wlogin="+UD;
</script>

 

and then I get data from GET-mothod.

 

In .NET I can get this data without ActiveX and this much better, because ActiveX may by disabled.

0 Kudos
Message 4 of 4
(2,512 Views)