Running into a problem where a username token is used to
authenticate/encrypt a message to a web service. a custom token manager
looks up the password (token was configured to SendNone) in a database. this
all works fine. however if the user then goes and changes that password then
re-tries the request the server has the old token cached. I can't find how
to reset this or have some method called in my custom username token manager
so i can check if passwords have changed. the only thing we've found to work
is if the IIS cache is flushed after the database password update, then WSE
will call my username token manager so i can query the database for the
password.
Questions are:
Does anyone know how to programmatically flush the IIS cache?
Does anyone know how to force WSE to call my username token manager?
Is there some way that I can re-set the WSE token caceh so that my username
token manager is called?
Thanks,
Kyle Brandon
Paul Linhardt - 16 Sep 2004 21:31 GMT
Kyle,
Are you sure your problem is the IIS Cache? That doesn't sound right.
Maybe you should make your client user logout and log back in when he
changes his password.
Before calling the Web Service with a new token, make sure the client
removes the old token from the context and adds the new one:
ws.RequestSoapContext.Security.Tokens.Clear()
ws.RequestSoapContext.Security.Tokens.Add(token)
Here is an article on how to let database triggers let your
server-code know that data has been changed. Perhaps it will be of
help:
http://msdn.microsoft.com/msdnmag/issues/03/04/wickedcode/
Good Luck,
-Paul
> Running into a problem where a username token is used to
> authenticate/encrypt a message to a web service. a custom token manager
[quoted text clipped - 14 lines]
> Thanks,
> Kyle Brandon