Project Server 2010: Changing Master Page

This article is from Project Server 2010 blog.com

Once I tried simply to change master page, just to change an image. First of all I found out the master page. Project Server 2010 uses v4.master master page for all application pages. When my changes were applied I uploaded back master page to the master page gallery. And I was surprised, now all PS pages showed me an error: “The base type ‘Microsoft.Office.Project.PWA.PJBaseWebPartPage’ is not allowed for this page. The type is not registered as safe”. I did rollback, but still got the same error.

It was fixed by adding the following line to the web.config:

view plaincopy to clipboardprint?

  1. <SafeControl Assembly=”Microsoft.Office.Project.Server.PWA, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c” Namespace=”Microsoft.Office.Project.PWA” TypeName=”*” Safe=”True” />
<SafeControl Assembly="Microsoft.Office.Project.Server.PWA, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" Namespace="Microsoft.Office.Project.PWA" TypeName="*" Safe="True" />

Atferwards, instead of getting the previous error I got the new one: “An error occurred during the processing of /PWA/default.aspx. Code blocks are not allowed in this file”. It happened because SharePoint disabled the ability to create the server-side scripts by default, so you had to turn it on. You are able to do that in the web.config file, in the configuration/SharePoint/PageParserPaths configuration section:

view plaincopy to clipboardprint?

  1. <PageParserPath VirtualPath=”/pwa/*” CompilationMode=”Always” AllowServerSideScript=”true” />
<PageParserPath VirtualPath="/pwa/*" CompilationMode="Always" AllowServerSideScript="true" />

But new error appeared: “The control type ‘Microsoft.Office.Project.PWA.CommonControls.PageProperty’ is not allowed on this page. The type is not registered as safe.”

view plaincopy to clipboardprint?

  1. <SafeControl Assembly=”Microsoft.Office.Project.Server.PWA, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c” Namespace=”Microsoft.Office.Project.PWA.CommonControls” TypeName=”*” Safe=”True” />
<SafeControl Assembly="Microsoft.Office.Project.Server.PWA, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" Namespace="Microsoft.Office.Project.PWA.CommonControls" TypeName="*" Safe="True" />

Issue is finnaly fixed. Now you can apply any changes to the master page without getting errors.

JSteg said…

Thanks! I got one other error when looking at a project detail page when clicking a project name in project center:

The base type ‘Microsoft.Office.Project.PWA.ApplicationPages.ProjectDrillDownPage’ is not allowed for this page. The type is not registered as safe.

I had to add this line to the web.config as well.

SafeControl Assembly=”Microsoft.Office.Project.Server.PWA.ApplicationPages, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c” Namespace=”Microsoft.Office.Project.PWA.ApplicationPages” TypeName=”*” Safe=”True”

disco_mickey said…
I have been stuck on this for days now. I also have the same error relating to “The base type ‘Microsoft.Office.Project.PWA.ApplicationPages.ProjectDrillDownPage’ is not allowed for this page. The type is not registered as safe.” when I click on a project to bring up the project detail page. I have tried adding the following lines to C:\inetpub\wwwroot\wss\VirtualDirectories\80\web.config but no luck:

SafeControl Assembly=”Microsoft.Office.Project.Server.PWA, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c” Namespace=”Microsoft.Office.Project.PWA” TypeName=”*” Safe=”True”

and

SafeControl Assembly=”Microsoft.Office.Project.Server.PWA, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c” Namespace=”Microsoft.Office.Project.PWA.ApplicationPages” TypeName=”*” Safe=”True”

Do you have any other ideas? Everything else works fine!!

December 14, 2010 12:02 PM

ICC said…

Hi!

It looks you are adding incorrect assembly reference in your second line – you should use …Version=14.0.0.0… but not Version=12.0.0.0. Hope this helps!

February 3, 2011 7:38 PM

Maaz said…

These safecontrols and pageparser path addition in web.config don’t work in multi-server farm. I applied the above changes in standalone application on my personal and UAT environment but it doesn’t work and crashed the other sharepoint applications which were using the same webconfig.

April 13, 2011 6:20 PM

Maaz said…

it smoothly works on standalone application, it crashes on multiserver farm!

April 13, 2011 6:21 PM
Advertisements