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 服务,它由带有 nettcpbinding 和 Windows 身份验证的 IIS 托管,我正在尝试使用用户名/角色进行授权。但是服务允许任何用户访问它。
这首先可能吗?
听起来您有一些配置错误。IIS 不允许使用 nettcp 绑定托管 WCF。您需要将 WCF 托管在 Windows 服务或 WAS 中(仅在 Windows Server 2008 中)。请参阅Michele Leroux Bustamante 的Learning WCF以获得有关如何执行此操作的出色参考。