Answers for "get ip server asp.net"

C#
2

get host ip address asp.net core

var httpConnectionFeature = httpContext.Features.Get<IHttpConnectionFeature>();
var localIpAddress = httpConnectionFeature?.LocalIpAddress;
Posted by: Guest on December-09-2021
0

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;

            ...
        }
    }
}
Posted by: Guest on January-18-2021

C# Answers by Framework

Browse Popular Code Answers by Language