c# - .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).
解决方案
推荐阅读
- javascript - 如何使用 Google Maps JavaScript Api 针对不同位置的查询结果添加不同的标签?
- c++ - C++ Visual Studio 中的 Ascii 字符代码与实际字符符号不匹配?
- haskell - 遍历模板 Haskell AST
- python - 在python中将大数除以10会得到错误的结果
- javascript - 是否有标准来签署和验证 node.js 代码?
- javascript - 我的 php/html 文件中的提交按钮有问题
- jsonpath - Wiremock 中的嵌套表达式
- javascript - 如何在javascript中将一个类的属性复制到另一个类,包括方法
- ruby-on-rails - 从视图中使用 ransack 对多列进行排序
- kotlin - Kotlin 中的可空变量