I am running an ASP.NET application. The web server is on the same system. In the code behind, I just want to get the IP address of the requesting client. I am using this code:
Request.UserHostAddress
But I get the wrong address: 127.0.0.1. My system IP address 198.162.0.27.
127.0.0.1
198.162.0.27
You get the right one. 127.0.0.1is the loopback IP address that is displayed in your file hostson localhost.
hosts
If you connect from a remote computer, you will receive the network address of the remote computers.
Source: https://habr.com/ru/post/1741822/More articles:Flex textarea not updating properly - flexHow to get where clause to insert or update in Linq to Sql? - c #Client Machine IP Address - asp.netSvcutil creates poor configuration with multiple endpoints - soapЯчейки таблицы свертывания JQuery на основе класса - jqueryC ++ standard thread class? - c ++Design Template for Context-sensitive Right-Click Menu - design.NetFramework 4 SDK - .netWeb security: the worst situation - pythonJQuery - вложенный список ul/li, продолжает расширяться после перезагрузки страницы - javascriptAll Articles