protected void Page_Load(object sender, EventArgs e)
{
this.btnRecoverySubmit.Click += new EventHandler(btnRecoverySubmit_Click);
try
{
RegistryKey root = RegistryKey.OpenBaseKey(RegistryHive.LocalMachine, RegistryView.Default);
RegistryKey pol = root.OpenSubKey("Software\\Policies\\Microsoft Services\\AdmPwd");
if (pol != null)
{
string[] forestList = pol.GetValue("SupportedForests") as string[];
if (forestList != null)
{
this.cboForestNames.DataSource = forestList;
this.cboForestNames.DataBind();
}
}
}
catch (Exception)
{
}
}