c# - RDWEB 中的登录自定义

标签 c# asp.net asp.net-mvc asp.net-mvc-4 remote-desktop

我在 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/

相关文章:

javascript while循环正确迭代但具有相同逻辑的for循环不是,在具有整数值和其中一些空值的数组上

asp.net - 如何在父级中确定弹出的 radWindow 是否已关闭?

javascript - 如何将 FontAwesome 放入 Inner.html

c# - 为什么在 NServiceBus.Host.exe 中托管 NserviceBus 端点的 Windows 服务在没有为 exe 报告错误时无法启动?

C# 编码(marshal) uint*& 参数

c# - 如何在 C# 中更改主机名?

c# - 从 Excel 文件中删除密码——无需在我的服务器上安装 Excel

.net - web.config 忽略 Settings.Default.<Property> 并始终使用默认值

c# - 如何禁止 child 访问 ASP.net MVC 中的父操作方法?

c# - 如何根据面向旋转的对象更改数组中航路点的顺序?