I created a custom Master page in visual studio, deployed it and used the FeatureActivated event to set it to the default and custom master for the site.
SPWeb curWeb = (SPWeb)properties.Feature.Parent;
SPSite curSite = curWeb.Site;
SPWeb rootWeb = curSite.RootWeb;
Uri masterUri = new Uri(rootWeb.Url + "/_catalogs/masterpage/FamilyCare.master");
rootWeb.MasterUrl = masterUri.AbsolutePath;
rootWeb.CustomMasterUrl = masterUri.AbsolutePath;
rootWeb.Update();
All the site pages that i deploy to the content database are fine and use the new master. However there are a few pages in the _layouts directory like ManageFeature.aspx that are now having a problem. When i try to load them they give a generic error" So i copied the code into a temp site page in Sharepoint Designer to see if i could dianose the issue and i get the following message
"The page has controls that require a Master Page reference, but none is specified.
Attach a Master Page, or correct the problem in Code View"
I don't understand what it is talking about...this aspx file has not been modified from when Sharepoint 2010 was installed. Sharepoint designer indicates that the default and custom master are set....and the problem persists even if i manually switch the master page. Any suggestions as to what i did wrong?