4
Reply

How to get a client system IP address

Kanakaraj V

Kanakaraj V

14y
10.7k
0
Reply

    HI,
    please use the below function to get the client ip address.
    private string IppAddress()
        {

            string strIpAddress;

            strIpAddress = Request.ServerVariables["HTTP_X_FORWARDED_FOR"];

            if (strIpAddress == null)

                strIpAddress = Request.ServerVariables["REMOTE_ADDR"];

            return strIpAddress;

        }

    1) use the System.DateTime.DaysInMonth() method to find the same

    2) DateTime.DaysInMonth(2010,10).ToString();

    Request.UserHostAddress

    1) Opend Url  --- Request.Url.AbsoluteUri,

    2) For Ip Address --  Request.UserHostAddress

     

     

    Goud