Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

ASP.NET windows authentication should always ask for credentials

Problem statement : I have implemented windows authentication on my website. I have used following code in my web.config for authentication

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

Now, the problem is that when I access the website, it takes the default ( windows) credentials and tries to login.

But I need that it should prompt the user for credentials so that user can enter domain-name\id and password of separate domain for authenticate (User will have VPN access to this other domain)

like image 827
Atur Avatar asked Dec 05 '25 17:12

Atur


1 Answers

You can achieve this using Digest Authentication mode in IIS. Once enabled it will prompt always for UserName/Password to the end user.

You can read more about this type authentication here:

http://technet.microsoft.com/en-us/library/cc778868(v=ws.10).aspx

http://technet.microsoft.com/en-us/library/cc754104(v=ws.10).aspx

like image 114
Santosh Panda Avatar answered Dec 08 '25 09:12

Santosh Panda



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!