Search code examples
c#asp.netexceptionsharepoint-2010master-pages

Sharepoint 2010 Exception error


I perfomed in past days a migration of a web application from Sharepoint 2007 to Sharepoint 2010.

I noticed some exception error on a page of the web site which where caused by one webparts on the page.

Appending the query string ?contents=1 to the address page in the browser I obtained the webpart giving the error and eliminated it from the browser.

Then on Sharepoint Designer I eliminated the reference of the web part from the page header.

After these deletion the browsing of the page now return the error:

Only Content controls are allowed directly in a content page that contains Content controls. 

After some googling without valid results I used USL viewer to get more error information and I found these extra adds:

System.Web.HttpException: Only Content controls are allowed directly in a content page that contains Content controls.   
at System.Web.UI.FileLevelPageControlBuilder.AppendLiteralString(String text)    
at System.Web.UI.TemplateParser.ProcessLiteral()

Unfortunately in not the amount of info I would desired: as far as I can see the trouble is related to something wrong in content page.

Anyone experienced something similar?


Solution

  • I found that the error was caused by a spurious character outside the <content /> tag: once I deleted the uncorrect char I didn't get the error.

    Thank you