<?xml version="1.0"?>
<authentication mode="Windows"/>

How can you retreive the authentication mode programatically?

 Posted by Ddd on 2/22/2011 | Category: ASP.NET Interview questions | Views: 2880 | Points: 40

To retreive the authentication mode, write this code snippet in Page_Load()

AuthenticationSection a=(AuthenticationSection) WebConfigurationManager.GetSection("system.web/authentication");



You must include System.Web.Configuration namespace for this code to work,

Asked In: Many Interviews | Alert Moderator 

Comments or Responses

Login to post response