I just ran into this problem with MS 9.1. Scott is correct about needing a mod in App_Templates/AdminMaster.master.cs. The simplest, brute force way to make this work in precompiled is to modify the beginning of the Page_Load event handler:
Code:
//if (base.ThisCustomer.Notes.Trim().Length > 0 && base.ThisCustomer.Notes.Contains(".ascx"))
//{
// LoadMenu(base.ThisCustomer.Notes, base.ThisCustomer.LocaleSetting, false);
//}
//else
//{
// LoadMenu("AdminMenu.ascx", base.ThisCustomer.LocaleSetting, true);
//}
pnlMenu.Controls.Add(LoadControl("/admin/Controls/AdminMenu.ascx"));
Adjust the "path to the control" string if you have changed the name of the admin directory.
If you want to automatically adjust to admin directory name changes and/or use the Customer.Notes trick for giving custom, restricted access to the Admin area then, instead of the above, replace in AdminMaster.master.cs the NewAdmin_App_Templates_AdminMaster.LoadMenu method with:
Code:
private void LoadMenu(String ctrlToLoad, String localeSetting, bool isDefaultMenu)
{
//Boolean controlExists = true;
Control adminMenu;
String ctrlName = AppLogic.AdminLinkUrl("Controls/" + ctrlToLoad, true);
Literal litError = new Literal();
litError.Mode = LiteralMode.PassThrough;
litError.Text = AppLogic.GetString("admin.menu.loaderror", localeSetting);
try
{
try
{
adminMenu = LoadControl(ctrlName);
}
catch
{
adminMenu = litError;
SysLog.LogMessage("Control Not Found", "Unable to load menu control {0}.".FormatWith(ctrlToLoad), MessageTypeEnum.GeneralException, MessageSeverityEnum.Error);
}
pnlMenu.Controls.Add(adminMenu);
}
catch (Exception ex)
{
SysLog.LogException(ex, MessageTypeEnum.GeneralException, MessageSeverityEnum.Error);
}
}
This should be essentially the same functionality as the original but work in the precompiled context.