I have an asp.net aspx page that I log the user in using forms authentication.
Later on I want to log the user out using a call to a wcf service that I created.
The wcf service will call formsauthentication.lo开发者_StackOverflow中文版gout...
I try this but it doesn't seem to work..
As Kirk comments this is not possible with standard forms authentication.
However, depending upon what you want to achieve and how much time you have available, you could try:
- Set a very short timeout on the cookie
- Recycle the application pool, deleting all session cookies, everyone gets logged out
- Override the forms authentication provider, store info in database, where you can delete it
精彩评论