Frage

What do I need to do in order to use custom principal (Preferrably a claim based one) to impersonate a Sql Server user.

        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);

In the end I want SQL Server to trust my application layer, and the principal/role that it defines.

War es hilfreich?

Lösung

SQL Server does not support that.

Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top