Note: Forums will be making significant UX changes to address key usability improvements surrounding search, discoverability and navigation. To learn more about these changes please visit the announcement which can be found HERE.

Answered Error excuting $Web.Update()

  • Thursday, May 19, 2011 1:00 PM
     
     

    Hi,

    I use Project Server 2010 and in order to make all the tests I created a test environment (different servers and so on...)

    I have an issue with the test environment: when I try to transfer the information from the production environment to the thest environment I use the following method:

    1. I delete the Service in Central Administration->Application Management->Service Appliction->Dev Service Appllication->Deletehttp://MyPS2010/PWA

    2. Central Administration->Manage Content Database->WSS_Content-> Offline and Remove Content Database

    3. Restore the 5 databases: Archive, Draft, Published, Reporting and WSS_Content.

    4. Central Administration->Manage Content Database->Add Content Database-> The one I've just restored

    5. Central Administration->Manage Service Application->Dev Project Service Application->Create Projoect Web App Site ->http://MyPS2010/PWA

    6. I run in powershell the commands:

    $Web=get-SPWeb http://MyPS2010/PWA

    $Web.AllProperties | Format-Table

    $Web.AllProperties["PWAURL"]=http://MyPS2010/PWA

    $Web.AllProperties["reportingservername"]="MySQLSRV"

    $Web.Update()

    And the problem is running the last command, sometimes works and most of the times doesn't work, the error I get running $Web.Update() is:

    Exception calling "Update" with "0" argument(s): " Access is denied. (Exception
    from HRESULT: 0x80070005 (E_ACCESSDENIED))"
    At line:1 char:12
    + $Web.Update <<<< ()
    + CategoryInfo : NotSpecified: (:) [], MethodInvocationException
    + FullyQualifiedErrorId : DotNetMethodException

    And I keep trying and trying until it works. When it works I have to execute some tasks more (Change PDP's, Deactivate OLAP Management, Change Server in Quick Launch and Bulk Update Project Sites)

    Can someone help me to know why I get this error in $Web.Update()?

    By the way, if you think that I forgot something in this method, please, tell me and I will change it.

    Thank you and regards,

    José Espases

All Replies

  • Thursday, May 19, 2011 1:19 PM
    Owner
     
     
    Basically you should follow the five database attache procedure to transfer data from one environment to another. Does it work when you provision a PWA instance using the Central Admin UI?
    Blog | Facebook | Twitter | Posting is provided "AS IS" with no warranties, and confers no rights.
    Project Server TechCenter | Project Developer Center | Project Server Help | Project Product Page
  • Thursday, May 19, 2011 1:32 PM
     
     

    Hi Christophe,

    yes, it works fine.

    I have everything duplicated, meaning that I have two virtual servers (app and sql)  other than the two servers used for production, in fact is a second installation totally separated, that's why I restore the 5 databases in the other virtual server, I don't use the sql command Attach or Dettach, I just backup the db's in the sql production server and then I restore them in the test server, I've done it several times and there is no problem, I just get a perfect duplication of data (that's what I need to make tests). Then I have to touch some details (the ones I described above) and then it works as I want.

    The only problem is the one I'm asking about.

    If you can help me I will appreciate.

    Thank you and regards,

    José Espases

  • Tuesday, May 31, 2011 7:41 AM
     
     Answered

    Just for your information:

    The way I have found to solve this problem is to restart the servers, I know is an extreme solution but, as the servers are test servers then I'm not disturbing at all as the servers are used only by me.

    Regards,

    José Espases

    • Marked As Answer by José Espases Tuesday, May 31, 2011 7:41 AM
    •