Click here to Skip to main content
15,891,136 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi to all,

How to define all the three authentication modes in a web config at a time and bind them in a dropdown?
Posted
Updated 2-Nov-10 5:06am
v2
Comments
Dalek Dave 2-Nov-10 11:07am    
Minor Edit for Grammar.
Abhishek Sur 2-Nov-10 16:50pm    
Not possible from your own application.

If I understand your question, you want to allow a user to select which authentication mode will be used to log on to a web site.

I'm pretty sure that the <system.web> block, which contains <authentication>, is read and processed before any pages are compiled. That is to say, the authentication mode must already be set before the server can serve up any pages, so that it knows how to authenticate the user.

I don't think you can do what you want to do.

Added I did some poking around with Google and confirmed my answer. The only way to do what you seem to be asking is to create separate web applications, each using a different authentication method.
 
Share this answer
 
v2
look at this:


<authentication mode="Windows" />
   <authorization>
       <allow users="*" />
   </authorization>




you can look for allow and deny mode in web.config :)
 
Share this answer
 
you can create roles and assign authorization basing on roles
for example:
<authorization><br />
 <allow manager="" /><br />
  <allow members="" /><br />
  <deny users="?" /><br />
 </authorization>
 
Share this answer
 
v3

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900