string windowsLogin = this.Context.Request.LogonUserIdentity.Name; //Normally if the domain is present you get a string like DOMAINNAME\username, remove the domain int hasDomain = windowsLogin.IndexOf(@"\"); if (hasDomain > 0) { windowsLogin = windowsLogin.Remove(0, hasDomain + 1); } //end if Session["UserName"] = windowsLogin;
function Logout() { try { if (window.XMLHttpRequest) { document.execCommand("ClearAuthenticationCache"); } else { alert("This feature requires Internet Explorer 6.0 Service Pack 1 or above. " + "Please close all browser windows in order to complete the logout process."); } } catch (e) { alert("This feature requires Internet Explorer 6.0 Service Pack 1 or above. " + "Please close all browser windows in order to complete the logout process."); } //netscape.security.PrivilegeManager.enablePrivilege("UniversalBrowserWrite"); //self.close(); window.close(); }
XMLHttpRequest
ClearAuthenticationCache
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)