Using Windows Role authentication in the App.config with WCF

后端 未结 3 2003
无人共我
无人共我 2020-12-29 15:38

I am using a WCF service and a net.tcp endpoint with serviceAuthentication\'s principal PermissionMode set to UseWindowsGroups.

Currently in the implementation of th

3条回答
  •  抹茶落季
    2020-12-29 16:42

    If I understood well you want to select the role at runtime. This can be done with a permission demand within the WCF operation. E.g.

    public string method1()
    {
        PrincipalPermission p = new PrincipalPermission(null, "Administrators");
        p.Demand();
        ...
    

提交回复
热议问题