Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有一个 WCF 服务返回 xml。我只想要一个 IP 地址来访问它,例如:10.0.0.5
有人可以告诉我我该怎么做。请告诉我防火墙和 IIS 以外的其他信息
您需要添加 ip 过滤,类似于下一个 - https://stackoverflow.com/a/803813/182344
或者使用ServiceAuthorizationManager.CheckAccessCore从 OperationContext 获取客户端 IP。