Last post Jul 12, 2012 01:21 PM by BrockAllen
Jul 12, 2012 10:04 AM|grs5211|LINK
At some stage or another a user might want to use the currently logged on computer to quickly do a task, then log out again.
I want to log the current user off, and log the new one in, without having to go through the "Ctrl+Alt+Del" method that Microsoft offers.
I have tried the code example at
http://www.roelvanlisdonk.nl/?p=825 (ASP.NET-C#- How to "Sign in as Different User" like Microsoft Sharepoint with Windows Authentication.
I get the new logon screen and insert a valid userID and password, but it just comes back to the original login name.
I fetch this from "Request.LogonUserIdentity.Name;"
Our corporate system does have windows 7 authentication protocols in place, and I fear that programatically logging in as a different user is not that simple!!!!!!
Jul 12, 2012 01:21 PM|BrockAllen|LINK
If you're using Windows authentication then you will always get the identity of the person logged into the client machine. If you want a different user then they will have to logout and switch to a different windows login. If you're relying upon windiws
authentication then that's just how it's done.
Now, if that won't work for you then you'd need to change how your web app does authentication such that the user must enter credentials. Then the login will be based upon the browser session (and not session state -- two different semantics despite the
similar term). So to do this, then you're probably looking at forms authentication. That way the user can click logout and then their client machine authentication is not tied to the web app authentication.