Improve company productivity with a Business Account.Sign Up
protected void Page_Load(object sender, EventArgs e)
// Create a 401 response
Response.Buffer = true;
Response.StatusCode = 401;
Response.StatusDescription = "Unauthorized";
// A authentication header must be supplied. This header can be changed to Negotiate when using keberos authentication
// Send the 401 response
Open in new window
var request = new XMLHttpRequest();
request.open("get", "/logout", false, "false", "false");
window.location.replace("WHEREVER YOU WANT YOUR LOGGED OUT USER TO GO");
Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.
Have a better answer? Share it in a comment.
Please enter a first name
Please enter a last name
Must be at least 4 characters long.
Join and Comment
From novice to tech pro — start learning today.
Premium members can enroll in this course at no extra cost.