开发者

wcf ServiceSecurityContext concurrency

开发者 https://www.devze.com 2023-02-09 12:36 出处:网络
I have a WCF service which uses a custom authentication and authorization manager. Each time a client makes a call the authentication manager looks for a message header and uses the information to i

I have a WCF service which uses a custom authentication and authorization manager.

Each time a client makes a call the authentication manager looks for a message header and uses the information to identify the user. The user gets created as an IPrincipal and placed into ServiceSecurityContext.Current.AuthorizationContext.Properties["Principal"].

I noticed on subsequent calls, where the users is different, the old user info is in the Current context. My service is tagged as PerCall. I am stumped on why the context is not getting cleared for every call.

Or is OperationContext diff开发者_StackOverflowerent lifetime from SecurityContext?

If so any ideas on how to achieve what I described above? Thanks for help.

0

精彩评论

暂无评论...
验证码 换一张
取 消