简体   繁体   中英

Prevents auto (windows) authentication when browing intranet bound to Active Directory

Whenever I run my MVC web application which uses Windows Authentication from Visual Studio, I get authenticated to my real domain account without any prompting. The problem is I want to run a few test and need to connect with other accounts as well. But despite I tried a lot of thing (tried several browsers, cleared hisotry, cookies, etc. and even tried removing a few credentials from the Seven "Credential Manager") I always and always get auto authenticated withouth any prompting (or warning or whatever that could help me cancel that).

How can I prevents this or at least authenticate myself with another account?

Note: There's no logout button on the website.


I tried Private Browsing as someone (who removed his comment?!) suggested. I still get auto-authenticate but this time I don't see the same exact output.
Where I usually see my login on the page (Chrome, IE, FF) I here see my full name.
So, that changes something, but I don't know what and it still doesn't allow me to authenticate myself as someone else.


NVM that previous edit, it was a side effect of an unrelated operation I did before (It just took a restart to have a visible effect).

To make Internet Explorer asks credentials every time you open an intranet page follow this steps:

Tools->Internet Options->Security-> Select "Local intranet" and go to "Custom level...".

After that go all the way down in the option list and change the option of "Logon" under "User Authentication" to "Prompt for user name and password.

在此输入图像描述

I managed to change user, I don't know if every step I used were necessary but here's what I did that eventually allowed me to "logout".

  • Switch to IIS Server instead of VS Dev server
  • Close all browsers
  • Close all runnin ASP.Net Dev server
  • Reset IIS (iisreset)
  • Launch Debug (which start a FF window)

Now if I repeat the 3 last step, I can change user with no problem.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM