This is a migrated thread and some comments may be shown as answers.

client-side OS user name, Machine name and IP

5 Answers 907 Views
Ajax
This is a migrated thread and some comments may be shown as answers.
Qamar uz Zaman Cheema
Top achievements
Rank 1
Qamar uz Zaman Cheema asked on 11 Jan 2010, 11:16 AM
I want to get client-side information of OS user name , machine name , and IP address
I'm able to get IP address only
guide me how to get OS user name and machine name from client-side

5 Answers, 1 is accepted

Sort by
0
Shinu
Top achievements
Rank 2
answered on 11 Jan 2010, 01:26 PM
Hi Qamar,

One suggestion is access the system and get the values ServerSide and pass it to clientside for further actions.

CS:
 
protected void Page_Load(object sender, EventArgs e) 
    { 
        string[] computer_name = System.Net.Dns.GetHostEntry(Request.ServerVariables["remote_addr"]).HostName.Split(new Char[] { '.' }); 
        HiddenField1.Value = computer_name[0].ToString(); 
 
        string a = System.Security.Principal.WindowsIdentity.GetCurrent().Name.ToString(); 
        HiddenField2.Value = a; 
    } 

JavaScript:
 
 function accessValues() { 
        var hf1 = document.getElementById('HiddenField1'); 
        alert(hf1.value); 
        var hf2 = document.getElementById('HiddenField2'); 
        alert(hf2.value); 
 
        // var a = '<%=System.Security.Principal.WindowsIdentity.GetCurrent().Name.ToString()%>'; 
        // alert(a); 
    } 

-Shinu.
0
Qamar uz Zaman Cheema
Top achievements
Rank 1
answered on 12 Jan 2010, 09:15 AM
No,
I want to get these information from Client-side and save it at server-side
I don't want to send server information to client

My application is accessible within the LAN and the goal is to get user authentication as well as user's machine information and OS log in also.
0
Veli
Telerik team
answered on 12 Jan 2010, 09:31 AM
Hello Qamar uz Zaman,

Javascript security restrictions do not allow you to access that info.

Kind regards,
Veli
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
0
Qamar uz Zaman Cheema
Top achievements
Rank 1
answered on 12 Jan 2010, 10:04 AM
well
then suggest me what should to do 
0
Dimo
Telerik team
answered on 12 Jan 2010, 11:05 AM
Hi Qamar uz Zaman,

Well, you need to think in some other direction and use a completely different approach to manage users in your application. This task is not related to RadControls.

Regards,
Dimo
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Tags
Ajax
Asked by
Qamar uz Zaman Cheema
Top achievements
Rank 1
Answers by
Shinu
Top achievements
Rank 2
Qamar uz Zaman Cheema
Top achievements
Rank 1
Veli
Telerik team
Dimo
Telerik team
Share this question
or