Search code examples
asp.netwindows-authenticationlogoff

Cross-browser windows forms logoff?


Looking for a cross-browser way to log a user off a webpage which uses windows authentication.


Solution

  • There is not an ultimate solution. This is a known limitation of all types of www authentications.

    You can send a fake unauthorized answer to request password again. This approach may help you to simulate logoff.

    Response.Status = "401 Unauthorized"
    Response.AddHeader "WWW-Authenticate", "Negotiate"
    Response.AddHeader "WWW-Authenticate", "NTLM"