Answer: Write following code.
System.Web.Configuration.AuthenticationSection section =
(AuthenticationSection)WebConfigurationManager.GetSection("system.web/authentication");
Label1.Text = section.Mode.ToString();
You will get the authentication mode set in your web.config file.
Asked In: Many Interviews |
Alert Moderator