Get Users Information

  1. #1

    Get Users Information

    Is the any function inside Ext.Net to retrieve User´s IP Adress?
  2. #2
    Hi,

    The following demonstrates a few different options, see

    http://www.geekpedia.com/KB32_How-do...P-address.html

    This functionality is included with ASP.NET (.NET) and is not dependent on Ext.NET.

    Hope this helps.
    Geoffrey McGill
    Founder
  3. #3
    Here's the contents of the above post. I'll posts just in case the above disappears at some point.

    There are two possible ways, either using:

    HttpContext.Current.Request.UserHostAddress;

    or using

    HttpContext.Current.Request.ServerVariables["REMOTE_ADDR"];

    Furthermore there is information that the below line retrieves the actual IP address and not the Proxy:

    HttpContext.Current.Request.ServerVariables["HTTP_X_FORWARDED_FOR"];
    Geoffrey McGill
    Founder
  4. #4
    Thank you for replying soon geoffrey,

    i know the existing methods in C# to retrieve user´s IP, but i was looking for an way to get the LAN IP Address (behind the Proxy). I think that i am just gonna achieve this using ActiveX or VBScript :(
  5. #5
    Quote Originally Posted by rsaldanhabr View Post
    Thank you for replying soon geoffrey,

    i know the existing methods in C# to retrieve user´s IP, but i was looking for an way to get the LAN IP Address (behind the Proxy). I think that i am just gonna achieve this using ActiveX or VBScript :(
    You might be able to pick something up on the client-side (via JavaScript) and then back to the server using a [DirectMethod].

    Other than that, there is nothing specific in Ext.NET or ExtJS which would help get this information.

    Hope this helps.
    Geoffrey McGill
    Founder
  6. #6
    ok, thank you
  7. #7
    I'll recomend use someting like this:

                    string IP;
                    IP = Request.ServerVariables[ "HTTP_X_FORWARDED_FOR" ];
                    if ( IP == null )
                    {
                        IP = Request.ServerVariables[ "REMOTE_ADDR" ];
                    }
                    lblIP.Text = "IP " + IP;

Similar Threads

  1. [CLOSED] High CPU on hundred of users
    By jeybonnet in forum 1.x Legacy Premium Help
    Replies: 1
    Last Post: Oct 10, 2012, 4:06 PM
  2. [CLOSED] Allow Users To Order a List of [Objects]
    By garrisrd in forum 1.x Legacy Premium Help
    Replies: 1
    Last Post: Apr 18, 2011, 3:11 PM
  3. Force users to select a row in GridPanel
    By Kamal in forum 1.x Help
    Replies: 2
    Last Post: Sep 21, 2009, 5:35 PM
  4. Replies: 1
    Last Post: May 04, 2009, 12:06 PM
  5. [CLOSED] Current Users Online
    By speedstepmem3 in forum 1.x Legacy Premium Help
    Replies: 1
    Last Post: Nov 19, 2008, 5:14 AM

Posting Permissions