Using windows authentication in asp.net with c#

本秂侑毒 提交于 2019-12-01 17:55:28
Nexus23

You are confusing SQL authentication with Windows authentication.

In order for this web page to work based on Windows authentication, your web.config needs

<authentication mode="Windows">

When you deploy your page to a web server, you need to disable anonymous authentication to restrict external users. Below is a snippet from an IIS7+ web server's authentication section:

If you need to program against logged in user or its group, you need to use the WindowsIdentity Class.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!