1

为了使用自定义主体(最好是基于声明的主体)来模拟 Sql Server 用户,我需要做什么。

        var claims = new List<Claim>
            {
                /* What do I need in here? */
            };

        var claimsIdentity = new ClaimsIdentity(
            claims, "Basic", "UserName", ClaimTypes.Role);

        Thread.CurrentPrincipal = new ClaimsPrincipal(claimsIdentity);

最后,我希望 SQL Server 信任我的应用层,以及它定义的主体/角色。

4

1 回答 1

0

SQL Server 不支持。

于 2013-11-02T12:50:50.120 回答