我在 rdweb 上使用 Windows 服务器管理器托管了应用程序,并为事件目录中的特定用户组提供了对 rdweb 的访问权限。
我想限制用户只能从特定网关登录,例如用户 A、B、C 只能从 17.45.45.1 登录。这怎么可能?
最佳答案
First you need to create a user group for specific ip address , then when a user trying to access in your site you have to check there IP Address through
IPHostEntry Host = default(IPHostEntry);
string Hostname = null;
Hostname = System.Environment.MachineName;
Host = Dns.GetHostEntry(Hostname);
foreach (IPAddress IP in Host.AddressList) {
if (IP.AddressFamily == System.Net.Sockets.AddressFamily.InterNetwork) {
IPAddress = Convert.ToString(IP);
}
}
关于c# - RDWEB 中的登录自定义,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/57534287/