Prioritise Windows Authentication over Anonymous Authentication in IIS

旧城冷巷雨未停 提交于 2019-12-13 16:40:38

问题


I've seen other answers saying how to secure virtual folders for Windows Authentication only. I would like to allow both anonymous AND Windows Authentication in IIS, but prioritise Windows Authentication over Anonymous Authentication. The reason for this is that the web app I am building needs to support anonymous access as well as privileged.

Is this possible? I.e. if Windows Authentication cannot authenticate against the domain, it will fall back to a generic identity, as opposed to the way it works out of the box by favouring anonymous access.

Developing on W7 with IIS.


回答1:


You could do the steps in this article: http://msdn.microsoft.com/en-us/library/ms972958.aspx

And then just don't redirect to a login page. Basically you trap the authentication error and keep going.



来源:https://stackoverflow.com/questions/4265223/prioritise-windows-authentication-over-anonymous-authentication-in-iis

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