问题
How i can implement Windows Authentication to authenticate user while logging in? I do not want to get a pop up window rather i would like to let my login page(LoginPage.aspx) do the same. Please provide me with the steps/ code(vb.net). Thanks
回答1:
It requires a good amount of code to access active directory and authenticate.Please refer the article on codeproject.com or msdn articles.
回答2:
Maybe you could use this tag in your web.config
<authentication mode="Forms">
<forms loginUrl="login.aspx" defaultUrl="Login.aspx" timeout="60"></forms>
</authentication>
And in your login.aspx you would write code to access Active Directory.
回答3:
You are missing the point about what windows authentication is. Forms authentication can be used when not part of a domain or there is some specific requirement that windows authentication cannot solve. If a computer is registered in an active directory domain, authentication with the web site will be transparent based on the credentials that were used to login to the domain, eliminating the need to supply credentials each time the application is accessed.
来源:https://stackoverflow.com/questions/13632706/windows-authentication-asp-net