IIS: Enable Windows Authentication

In this hint, I will explain how to enable Windows Authentication in IIS? Additionally, we will answer the below IIS related questions:


What’s IIS?

IIS stands for Internet Information Services, it’s a webserver role that mainly runs on Windows Operating Systems and provides secure and management tools to manage web, application, and services hosting.

Enable IIS Windows Authentication

Is it possible to install IIS on Linux?

The IIS can also run on Linux. however, it is not recommended for production use!

What’s Windows Authentication?

Windows Authentication in IIS is a secure form of authentication where the user credential (UserName and password) is hashed before being sent over the network.

Windows authentication is not appropriate for use in an Internet environment, because that environment does not require or encrypt user credentials.

What’re the Supported Authentication protocols in Windows Authentication?

There are two authentication protocols supported in Windows Authentication:

  1. Kerberos.
  2. NTLM.

Enable Windows Authentication

Using Command Prompt

In my scenario, I tried to publish an ASP.Net web application on IIS 7 that only enables anonymous authentication by default.

Actually, I need to use Windows authentication to allow users to be authenticated using the NTLM.

Steps
  • Run command prompt from the start menu.
  • Type the below cmdlet to install IIS Windows Authentications.
 pkgmgr.exe /iu:IIS-WindowsAuthentication 
  • Again, Type “inetmgr” to open IIS and click ok.
  • The IIS should be opened.
  • Select your site > Click on the Authentication icon.
  • Enable Windows authentication.

Note: The default setting for Windows authentication is Negotiate. This setting means that the client can select the appropriate security support provider.

To force NTLM authentication, you must change the value of the <Provider> element under the <windowsAuthentication> element in the ApplicationHost.config file.

<windowsAuthentication enabled="true">
<providers>
<add value="Negotiate" />
<add value="NTLM" />
</providers>
</windowsAuthentication>

Using IIS GUI

  • First, make sure that the Webserver Role is installed on your server.
Web Server IIS Role on Windows Server
  • Open IIS.
Open IIS Manager
  • Go to “Sites” > select your site > Select “Authentication”.
Authentication Settings in IIS
  • Click on “Windows Authentication”, then click on “Enable”.
Enable Windows Authentication for a web site in IIS

Conclusion

In conclusion, we have briefly explained how to enable Windows Authentication for a web site in IIS, also we have explored the following:

Applies To
  • IIS7.
  • IIS8.
References
You may also like

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top