Configuration config = System.Web.Configuration.WebConfigurationManager.OpenWebConfiguration("~/HR"); System.Web.Configuration.SystemWebSectionGroup systemWeb = (System.Web.Configuration.SystemWebSectionGroup)config.GetSectionGroup("system.web"); System.Web.Configuration.AuthenticationSection section = (System.Web.Configuration.AuthenticationSection)systemWeb.Sections["authentication"]; System.Web.Configuration.AuthenticationMode currentMode = section.Mode; section.Mode = System.Web.Configuration.AuthenticationMode.Windows; if (!section.ElementInformation.IsLocked || !section.IsReadOnly()) config.Save();
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)