user67  
                
                  
                    December 5, 2024,  3:31pm
                   
                  1 
               
             
            
              Is there a way for an perspective client to get the windows user name and computer name?
             
            
              
            
           
          
            
            
              I'm pretty sure the answer is no. That would be a browser malware vulnerability.
  
  
    That does not show the computer name outside of the designer.
   
 
  
  
    Keep in mind that this operation works on the IP address of the TCP (http) connection to the server from the Server’s perspective.  Clients behind a NAT firewall will be seen as the firewall’s IP, and with the name of the firewall via reverse DNS. 
Users familiar with Vision’s total access to the local computer will forever be disappointed at the lack of access via browsers.
   
 
  
  
    Hello, 
I trying to create a security zone to prevent access to perspective from outside of a specific IP range. 
(192.168..) 
I’ve created the security zone and I’ve configurated the project properties to restrict access to user outside this zone. 
I’ve tried configuring the IP addresses of the security zone in different ways and I can’t get it to work: 
IP Addresses: 192.168.. 
IP Addresses: 192.168.0-255.0-255 
I have even tried: ... 
or from the localhost: 127.0.0.1 
…and none of this works,…
   
 
             
            
              2 Likes 
            
            
           
          
            
            
              If you need that, use Vision, not Perspective.
             
            
              
            
           
          
            
              
                bmpaz  
              
                  
                    December 20, 2024,  2:02pm
                   
                  4 
               
             
            
              You can get the user name and IP by calling the function: system.perspective.getSessionInfo(). It returns a long string with all of the current connected client sessions and you can pick out the IP and user from a session by finding that session id that matches the id returned from self.session.props.id. It doesn't give computer name though.
             
            
              
            
           
          
            
              
                pturmel  
              
                  
                    December 20, 2024,  2:09pm
                   
                  5 
               
             
            
              No need to search through session info.  Those two items are already present in session.props.host and in session.props.auth.user.userName.  And more.
But note that the host information is not accurate when the client is behind a NAT router. (Cannot be accurate.)
The information desired by the OP is simply not available in browser-based systems.  If you need it in Ignition, use Vision.
             
            
              2 Likes