January 12, 2010

SP2010 Beta 2: Error occurred during the processing of /my/default.aspx or /my/personcontent.aspx

Problem:
When you modify My Site master page (mysite.master) either using SharePoint Designer 2010 (SPD), or by creating new master page and setting your custom master page as Custom Master Page using SPD, you will end up with error when trying to access My Network page. You are not using any server side code blocks in your master page. In fact, you only need to create a new version of the default mysite.master without modifying it, and publish the new version, to get this error.

The error you see is: An error occurred during the processing of /my/default.aspx. Code blocks are not allowed in this file.

You might also get the same error from file /my/personcontent.aspx.

Solution:
You need to modify web.config and add the following PageParserPath (although you are not using inline code in your master page):

<SharePoint>
<PageParserPaths>
<PageParserPath VirtualPath="/my/default.aspx" CompilationMode="Always" AllowServerSideScript="true" />
</PageParserPaths>
</SharePoint>

No comments:

Post a Comment