client-side OS user name, Machine name and IP

6 posts, 0 answers
  1. Qamar uz Zaman Cheema
    Qamar uz Zaman Cheema avatar
    7 posts
    Member since:
    Dec 2009

    Posted 11 Jan 2010 Link to this post

    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
  2. Shinu
    Shinu avatar
    17764 posts
    Member since:
    Mar 2007

    Posted 11 Jan 2010 Link to this post

    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.
  3. Qamar uz Zaman Cheema
    Qamar uz Zaman Cheema avatar
    7 posts
    Member since:
    Dec 2009

    Posted 12 Jan 2010 Link to this post

    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.
  4. Veli
    Admin
    Veli avatar
    2002 posts

    Posted 12 Jan 2010 Link to this post

    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.
  5. Qamar uz Zaman Cheema
    Qamar uz Zaman Cheema avatar
    7 posts
    Member since:
    Dec 2009

    Posted 12 Jan 2010 Link to this post

    well
    then suggest me what should to do 
  6. Dimo
    Admin
    Dimo avatar
    8446 posts

    Posted 12 Jan 2010 Link to this post

    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.
Back to Top