wcf ServiceSecurityContext concurrency
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.
精彩评论