首页 > 解决方案 > .NET 5 Rest Api get client ip, machine name and location

问题描述

I have an application in the following configuration: Frontend -> Angular Backend -> .Net 5 Web API Hosted in Azure

For security reasons I needed to save the machine name, ip and user's location (city, country) in a table when he logged in. However as I use API Rest I was not able to find out how to capture this information.

I imagine that the location (city, country) I can get by IP. But now I'm not able to find a way to find out the user's hostname and ip when he requests the Rest API for Login (Post request).

标签: c#asp.net.netangularrest

解决方案


推荐阅读