title: ASP.NET Identity + Windows Authentication (Mix mode - Forms + Windows)
body: <p>I have tried my best to search the web before asking this question. I've seen similar questions on stackoverflow, however, none has been answered satisfactorily for a long time now. This is one more attempt to get this recurring question answered.</p>
  
  <p><strong>The Problem</strong></p>
  
  <p>How to build an ASP.NET MVC 5 website which uses "Windows Auth" for Intranet users and "Forms Auth" for Internet users? We'd like to accomplish this using ASP.NET Identity. Moreover, we don't want to use Active Directory Groups for authorization. For Intranet users, we want to authenticate them using Active Directory and then fall back to ASP.NET Identity to manage their roles and other profile data.</p>
  
  <p>It'll be nice if we don't ask the end user to choose auth method. The web app should log in intranet users seamlessly. They shouldn't even know that there is a login screen. Likewise, the internet users shouldn't be asked to enter their domain credentials. They should see form based login screen right away.</p>
  
  <p>Is there any recommended way of solving this? Or could you comment if any of the following are proper solutions?</p>
  
  <p><a href="http://world.episerver.com/blogs/Dan-Matthews/Dates/2014/8/Mixing-Forms-and-Windows-Authentication/" rel="noreferrer">http://world.episerver.com/blogs/Dan-Matthews/Dates/2014/8/Mixing-Forms-and-Windows-Authentication/</a></p>
  
  <p><a href="https://github.com/MohammadYounes/MVC5-MixedAuth" rel="noreferrer">https://github.com/MohammadYounes/MVC5-MixedAuth</a></p>
  
  <p><a href="http://mvolo.com/iis-70-twolevel-authentication-with-forms-authentication-and-windows-authentication/" rel="noreferrer">http://mvolo.com/iis-70-twolevel-authentication-with-forms-authentication-and-windows-authentication/</a></p>
  
  <p>FYI This is 2004 article, may not be helpful now:
  <a href="https://msdn.microsoft.com/en-us/library/ms972958.aspx" rel="noreferrer">https://msdn.microsoft.com/en-us/library/ms972958.aspx</a></p>