iisauthenticationntlmmixed-authentication

Anonymous access and NTLM authentication in IIS


I have a server set up with IIS, and my site has some pages which should allow anonymous access and some pages which should require the "Integrated Windows authentication". On the Authentication Method screen in IIS it looks like you can enable both "Integrated Windows Authentication" and anonymous access, but the documentation I've read seems to indicate you can only use one or the other.

Does anyone know how to allow anonymous access to some pages and require NTLM authentication on others?

Thanks,


Solution

  • You have to use the authorization section in web.config.

    To make only specific folders require authentication, you can have web.config with only the authorization element in subfolders like so:

    <configuration>
       <system.web>
          <authorization>
             <deny users="?" />
          </authorization>
       </system.web>
    </configuration>