how to get the ip asp.net mvc

89

how to get the ip asp.net mvc -

using System;
using System.Web.Mvc;

namespace Mvc.Controllers
{
    public class HomeController : ClientController
    {
        public ActionResult Index()
        {
            string ip = Request.UserHostAddress;

            ...
        }
    }
}

Comments

Submit
0 Comments