문제

I am migrating some WCF services to Web API. Is is possible to reuse the ServiceAuthorizationManager or is it strictly for WCF?

도움이 되었습니까?

해결책

Because ServiceauthorizationManager is member of System.ServiceModel namespace, it's a concept of WCF.

From the MSDN,

The ServiceAuthorizationManager is part of the WCF Identity Model infrastructure. The Identity Model enables you to create custom authorization policies and custom authorization schemes. For more information about how the Identity Model works, see Claims and Authorization.

Web API assumes that authentication happens in the host (IIS), which uses HTTP modules for authentication. Custom Authorization is achieved via custom Authorization Filters ( AuthorizeAttribute, AuthorizationFilterAttribute or IAuthorizationFilter). Take a look at asp.net web Api Security on asp.net

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top