Hi guys ... as the subject says I am attempting to modify the authorization section of a webconfig file at runtime.
Following is the code I am using to do so:
DataBase.MenuRolesDataTable mrt = new DataBase.MenuRolesDataTable();
mrt = this.getRolesByMenuId(menuid);
System.Configuration.Configuration c = WebConfigurationManager.OpenWebConfiguration(configPath);
AuthorizationSection authsection = (AuthorizationSection)c.GetSection("system.web/authorization");
AuthorizationRule ar = new AuthorizationRule(AuthorizationRuleAction.Allow);
string[] s = new string[mrt.Rows.Count];
int i = 0;
Go to the complete details ...