interviews.dotnetthread.com

↑ Grab this Headline Animator

Thursday, July 10, 2008

How to get the authentication mode from web.config file programmatically at runtime?

By using the following code we can retrieve the authentication mode which is set in the Web.config file under authentication section.

System.Web.Configuration.AuthenticationSection section =
(AuthenticationSection)WebConfigurationManager.GetSection("system.web/authentication");
Label1.Text = section.Mode.ToString();

Submit this story to DotNetKicks

No comments:

Post a Comment

Post your comments/questions/feedback for this Article.

 

Latest Articles