views:

343

answers:

2

My application needs to be designed so that an administrator can, via a web interface select if their users login via windows authentication or forms authentication.

This means I cant specify the authentication mode in the web.config i.e.:

<system.web>
    <authentication mode="Windows"/>
</system.web>

How do I approach this?

A: 

Use Forms authentication mode, whereby the login form can determine the user and the preferred authentication method for that user. If the user can be windows authenticated, you don't need to present the login form, just set the user as authenticated and redirect accordingly.

Doug
+1  A: 

There is an MSDN article with your exact request here:

http://msdn.microsoft.com/en-us/library/ms972958.aspx

Josh