且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

如何允许某些特定的 IP 地址访问我的 WCF 服务

更新时间:2022-11-27 13:36:35

你需要添加 ip 过滤,类似于 next - https://***.com/a/803813/182344

You need to add ip filtering, something like next - https://***.com/a/803813/182344

或使用 ServiceAuthorizationManager.CheckAccessCore您从 OperationContext 获取客户端 IP 的位置.

Or use ServiceAuthorizationManager.CheckAccessCore where you get client IP from OperationContext.