More in this section

Forums / General Discussions / Find IP address last logged in

Find IP address last logged in

2 posts, 0 answered
  1. Hydo L
    Hydo L avatar
    98 posts
    31 Mar 2010
    11 Jun 2011
    Link to this post

    Is there any way on sitefinity to find the IP address of the user who logged in to the CMS.

  2. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    12 Sep 2017
    13 Jun 2011
    Link to this post
    Hello Hydo L,

    You should track this when the request comes to Sitefinity. Generally you can get the current user by using
    SecurityManager.GetCurrentUserName() then check the current request and the IP for it

                   string userIp = Context.Request.ServerVariables["HTTP_X_FORWARDED_FOR"];
                    if (string.IsNullOrEmpty(userIp))
                        userIp = Context.Request.ServerVariables["REMOTE_ADDR"];

    Ivan Dimitrov
    the Telerik team
    Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
2 posts, 0 answered