ASP.NET Windows 身份验证模拟
我试图弄清楚如何使用 Windows 身份验证实现 ASP.NET 页面,而不会出现烦人的 IIS 登录框。
目前我的网络中有 3 个域,因此所有登录的人都必须在其用户名前加上域前缀。这对用户来说并不友好。我想要一个带有域组合框的自定义登录页面。
我发现的大多数示例都使用表单安全性来实现此目的,但是我需要 Windows 身份验证,因为我想使用集成身份验证而不是硬编码的用户名和密码连接到 SQL 服务器。
有谁知道有一篇好的文章或示例代码展示了如何实现这一点?
I am trying to figure out how to implement an ASP.NET page with Windows Authentication without getting that annoying IIS login box.
I currently have 3 domains in my network so all the people logging in would have to prefix their user names with the domain. This is not user friendly. I would like to have a custom login page that would have a domain combo box.
Most examples I found implement this using Form security, however I need Windows Authentication since I want to connect to the SQL server using Integrated Authentication rather than a hard coded user name and password.
Does anyone know of a good article or sample code that shows how to implement this?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
以下链接指向一篇文章,该文章解释了如何使用表单身份验证对 Windows 用户进行身份验证,它使用对本机 win32 api 函数
LogonUser
的调用来实现此目的。这样您就可以设计自己的自定义登录页面,并使用下拉列表来选择域。看看吧,也许会有帮助。使用表单身份验证的 Windows 身份验证
The following links to an article that explains how to authenticate a windows user using forms authentication, it uses a call to the native win32 api function
LogonUser
to acheive this. This way you can design your own custom login page with a drop down list to select a domain. Take a look, perhaps it will help.Windows Authentication using Form Authentication
要进行此设置,这样您就不会出现身份验证提示,您需要让域相互信任帐户。本文应该为您指明正确的方向:
http ://technet.microsoft.com/en-us/library/cc787646%28WS.10%29.aspx
To get this setup so you don't have the authentication prompt, you are going to need to have the domains trust the accounts from one another. This article should get you pointed in the right direction:
http://technet.microsoft.com/en-us/library/cc787646%28WS.10%29.aspx