With a custom UserNamePasswordValidator, can I kill a WPF user "session"?

I use a custom UserNamePasswordValidator that runs and logs into our internal API.

This API provides an event that fires when the user “kicks” (by another administrative user), and I would like to respond by killing a WCF session so that further calls raise an exception.

How should I do it?

My WCF service is hosted on a Windows service (not IIS). Creating and entering the internal API takes quite a lot of time, so I cannot do this every time I call the service.

0
source share
2 answers

http://www.neovolve.com/post/2008/04/07/wcf-security-getting-the-password-of-the-user.aspx, , ServiceCredentials , , Thread.CurrentPrinciple.

, Connection , , . CodeAccessSecurityAttribute, , , . , , .

0

, , . , , , ( ). , , .

Edit:

​​ InstanceContext. PerSession, InstanceContext . InstanceContext -, - , .

0

Source: https://habr.com/ru/post/1761278/


All Articles