Windows authentication of Intranet ASP.NET website and reappearing windows login box

拟墨画扇 提交于 2019-12-07 06:44:59

问题


I'm trying to enable automatic Window authentication working on our ASP.NET Intranet. I've changed the Authentication on our IIS 7.5 server from Anonymous to Windows Authentication Enabled only, and changed the Web.config file for the website to:

<authentication mode="Windows" />
 <authorization>
    <deny users="?" />
 </authorization>

The Windows login box appears when accessing the website via IE 8, I enter valid credentials, but the login window keeps reappearing as if it does not accept my credentials. By repeatedly cancelling the login box it disappears, and my login name can be viewed on the website. Is there any possible reason for the login box to keep popping up even though valid credentials are being entered? I've restarted the servers / cleared browser cache etc.

Also, ideally I would like the user to enter the login details once in the login box and not be required to reenter login details whenever he reopens the browser.


回答1:


Check if your browser has "Enable Integrated Windows Authentication" checked. In IE it's in the Advanced options.




回答2:


You should be able to configure it so you don't have to see the login prompt at all. IIS seems to be configured correctly since it's asking you for credentials. So I would test out the browser settings. Some things I would check for are that:

  1. Make sure that your browser recognizes the site as being in your Intranet. You should see the "Intranet" zone icon near the right side of your status bar.
  2. If not, you should add it to your list of local sites.
  3. Check that your credentials are being passed to sites in the local intranet.
  4. Make sure your links are all consistent, for example if you use a different DNS name or access by IP, the browser won't necessarily know they belong to the same site and try to reauthenticate.

Something else that might be going on is if you're trying access resources that you're account isn't allowed to. So make sure that isn't happening. I'm wondering since you said hitting cancel gets your page to show the login name.



来源:https://stackoverflow.com/questions/5419232/windows-authentication-of-intranet-asp-net-website-and-reappearing-windows-login

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