Project Server 2010: My PWA site thinks it is a Workspace (Site) Revisited


I posted a couple of weeks back about this scenario http://blogs.msdn.com/brismith/archive/2010/05/07/project-server-2010-my-first-fix-with-powershell-a-pwa-site-that-thought-it-was-also-a-workspace.aspx , which can be resolved with PowerShell in 2010, or through the UI in 2007 – but it appears there may also be a scenario where the UI does not show the PWA site associated with a project, yet still the rogue properties are set.  So without PowerShell you can instead use code to look at, and if necessary remove the values from these properties. 

A couple of snippets of code that might help you do this (you will need a reference to Microsoft.SharePoint):

To read the properties:-

using (SPSite site = new SPSite("hhtp://servername/pwa"))
            {
                using (SPWeb web = site.OpenWeb())
                {
                   String sPWAURL = web.AllProperties["PWAURL"].ToString();
                   String sMsPWAPROJUID = web.AllProperties["MSPWAPROJUID"].ToString();
                }
            }

You could either output the strings or just view in debug – or build a little forms app around this.

And to set then to NULL

using (SPSite site = new SPSite("http://servername/pwa”))
            {
                using (SPWeb web = site.OpenWeb())
                {
                    web.AllProperties["PWAURL"]="";
                    web.AllProperties["MSPWAPROJUID"]="";
                    web.Update();
                }
            }

I could be persuaded to use String.Empty in place of “”. 

I’d certainly be interested to hear if many customers run in to this issue – and one clue that you have the Project Workspaces (or Sites, in 2010) Collaboration List feature turned on is seeing Issues, Risks, Deliverables and Project Documents on the main PWA site.

Technorati Tags: ,
Comments (4)

  1. Joel says:

    Hey Brian, do you know if Project Server 2010 SP1 or any CU solved this issue?

  2. Hi Joel, well actually nothing is really broken - that property should not be set but if somehow it is then it will break things.  This isn't considered a bug.  That said I am a little concerned we see this quite often and more than I would think just because of accidental associations of /PWA with a project plan - so there could be something going wrong somewhere.  Happy to hear any ideas.

    Best regards,

    Brian.

  3. Dylin says:

    Hi Brian, we have seen this issue on our Project Server instance (shares farm with several other instances) multiple times within the last month.  Though it's a simple fix, have you ever identified what is happening to set this PWAURL property?

  4. Hi Dylin, I've not heard of the issue recurring like this - but if I had to guess I'd think you might have a project that is linked to a site that no longer exists, and when it tries to sync it ends up back at the root site.  Or you really have the PWA Url set as the site for a project.  You might be able to see some sort of timestamp in the site properties with PowerShell - and then maybe tie this to a queue job - or timer job perhaps - to at least find what might be triggering it.

    Best regards,

    Brian.

Skip to main content