I have implemented the “Sign in as different user” authentication functionality, using windows authentication, on our website. The functionality is same as SharePoint. I used explicit “un-authentication” by following code on our page which executes when user clicks on “Signin as different user” option:

protected void SignInAsDifferentUser_Click(object sender, EventArgs e)
            Response.StatusCode = 401;
            Response.StatusDescription = "Unauthorized";

It un-authenticates the page, when it reaches to the browser, and causes the browser to do authentication. It pops the authentication dialog box and user puts his/her credentials there and so authentication is done. If he cancels the authentication dialog box or do 3 consecutive failed authentication attempts, the functionality is written in my code to let him login as Guest.
I tested this functionality on IE 6/7/8 and on FireFox and it is working fine there. Issue raised when I tested it on Safari. It looked like Safari does not handle the 401 status code, as it does nothing and stay idle when this code reaches there. We don’t want the browser to stay idle, we want the browser to login the user as “Guest” if his/her authentication fails.
I am wondering what could be the right way of implementing the authentication functionality on Safari!

8 Years
Discussion Span
Last Post by shabbir.hussain

have u ever tried...


if hope the things should work out for u..


I tried but this isn’t helpful because I am using integrated windows authentication, please provide some other solution.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.