简体   繁体   English

在同一应用程序下为不同的WCF服务分配不同的(Windows)用户

[英]Assign different (windows) users for different WCF service under same application

Consider I am having 3 WCF services Svc1, Svc2 and Svc3. 考虑我有3个WCF服务Svc1,Svc2和Svc3。 I want to authenticate all users by using Windows Authentication but I want to authorize Svc1 to User1 (Windows Authen), Svc2 to User2 (Windows Authen), Svc3 to User3 (Windows Authen). 我想使用Windows身份验证来对所有用户进行身份验证,但我想将Svc1授予User1(Windows Authen),将Svc2授予User2(Windows Authen),将Svc3授予User3(Windows Authen)。

Currently I can authorize one or many users to all the services through IIS and I have all the above services under same project (application). 目前,我可以通过IIS授权一个或多个用户使用所有服务,并且我在同一项目(应用程序)下拥有上述所有服务。 How can I achieve the above? 如何实现以上目标? Is there is any way to configure the specific user for specific service like above? 有什么办法可以为上述特定服务配置特定用户?

Link to MSDN article explaining the authorization of WCF services using attributes. 链接到MSDN文章,文章解释了使用属性授权WCF服务。

Specified as 指定为

[PrincipalPermissionAttribute(SecurityAction.Demand, Name = "DomainName\UserName"]

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM