« Previous Next »

Thread: Combine forms and NTLM authentication IIS7

Last post 10-02-2009 6:24 AM by bcdt. 2 replies.

Average Rating Rate It (5)

RSS

Page 1 of 1 (3 items)

Sort Posts:

  • 10-01-2009, 12:54 PM

    • bcdt
    • Not Ranked
    • Joined on 09-29-2009, 1:37 PM
    • Posts 3

    Combine forms and NTLM authentication IIS7

    Is it possible to combine NTLM authentication and forms authentication on IIS7?

    The setup I need to achieve is internal users authenticated via integrated windows authentication and external users authenticated via forms.  So only external users have to login via a form; internal, already authenticated users, navigate straight to the site.

    I've already tried the approach detailed at:

    http://mvolo.com/blogs/serverside/archive/2008/02/11/IIS-7.0-Two_2D00_Level-Authentication-with-Forms-Authentication-and-Windows-Authentication.aspx

    but that setup forces all users to authenticate with *both* windows *and* forms authentication, 2 level authentication, not an 'either/or' situation.

    I had this working on IIS6 using a IP range check to redirect to the appropriate page as detailed here:

    http://beaucrawford.net/post/IIS-ldquo3bmixed-moderdquo3b-authentication-for-ASPNET-Application.aspx

    but it breaks in IIS7.  I think it's because you can't remove forms auth from the integrated windows page once it's enabled for the site...

    The core problem seems to be that anonymous authentication must be disabled for NTLM auth but enabled for forms auth.  I read in the Wrox Pro IIS7 book that forms auth is code based, all other authentication types rely on credentials transported in HTTP headers - 302 redirect for forms, 401 challenge for integrated, so they should be incompatible?, but as IIS7 has an integrated pipeline I think I should be able to customize authentication? but if that requires writing a custom HttpModule that's a pretty advanced subject.

    Can the pattern Mike used in the first link be modified to achieve what I want?  Or is that approach completely wrong for this situation?  Perhaps I can achieve this more simply via configuration?

    Any suggestions would be much appreciated, as I've worked through 2 wrox IIS7 books and still can't solve this problem.

  • 10-01-2009, 8:28 PM In reply to

    • lextm
    • Top 10 Contributor
    • Joined on 10-22-2008, 4:18 AM
    • Shanghai, PRC
    • Posts 1,406

    Re: Combine forms and NTLM authentication IIS7

    Well, Mike's suggestion is not applicable as you require something different.

    But can you try out the IIS 6 approach you found from Internet in classic pipeline mode? Maybe that helps.

    Regards,

    Lex Li
    Support Engineer at Microsoft
    ---------------------------
    This posting is provided "AS IS" with no warranties, and confers no rights.
  • 10-02-2009, 6:24 AM In reply to

    • bcdt
    • Not Ranked
    • Joined on 09-29-2009, 1:37 PM
    • Posts 3

    Re: Combine forms and NTLM authentication IIS7

    Hi lextm

    I changed the site to run in the classic .net app pool as you suggested and it worked perfectly.   Thanks!

     

Page 1 of 1 (3 items)
Microsoft Communities