在下面的Identity Server 3链接中,我必须填写用户名和密码才能登录。
但是,我需要的是,在使用Window的系统用户名在屏幕上闪烁登录页面之前,应该自动填充用户名。为此,我尝试了以下我在此处提出的以及对此问题的回答:
但这只适用于Internet Explorer,因为它只有Internet Explorer支持的ActiveX。我需要以某种方式传递(System.Environment.Username)< - 给我当前用户,我需要传递到登录页面
<script>
function GetUsername()
{
var wshshell = new ActiveXObject("wscript.shell");
var username = wshshell.ExpandEnvironmentStrings("%username%");
document.getElementById("username").value = username;
}
</script>
I called this method from <body lang="en" onload="GetUserName()"> but this only gives current username in Internet explorer. Please someone suggest me better answer if they have any idea.