SharePoint Page layout throws “Parser Error Message: Only Content controls are allowed directly in a content page that contains Content controls” during provisioning.

If you see something like this:

Line 42:     </WebPartPages:WebPartZone>
Line 43: </asp:content>
Line 44: <html xmlns:mso="urn:schemas-microsoft-com:office:office" xmlns:msdt="uuid:C2F41010-65B3-11d1-A29F-00AA00C14882"><head>
Line 45: <!--[if gte mso 9]><xml>
Line 46: <mso:CustomDocumentProperties>

This could be (it was in my case) caused by a very obscure behaviour of the web part manager during provisioning. Namely it doesn’t like your <asp:Content tags to be defined in lower case.

Wrong: Error prone page layout

</p>

<p><asp:content…</p>

<p>

Correct

</p>

<p><asp:Content…</p>

<p>

Yet another SharePoint time waster! 🙂

Advertisements
Tagged ,

2 thoughts on “SharePoint Page layout throws “Parser Error Message: Only Content controls are allowed directly in a content page that contains Content controls” during provisioning.

  1. MWMMossDev says:

    Thanks for this post, I came across this exact error!

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: