locked
SPSite PortalUrl property empty RRS feed

  • Question

  • I have a custom workflow that I've had in production for 3+ years.  In it I have a line of code that uses "workflowproperties.Site.PortalUrl.Length".  We recently created a new SP 2007 instance on a new virtual machine as a test environment.  I deployed all my workflows, etc.   My workflow fails in this new environment, I put in some debug and have found that the PortalUrl property is empty (therefore the .Length throws an error).  This is a built-in property, it should always have a value, I'm lost.  Anyone venture a theory or solution? 

    Thanks in advance,

    KevinHou

    Tuesday, February 8, 2011 4:42 PM

Answers

  • Solved -

    Go to the portal settings (Site Actions -> Site Settings), under Site Collection Administration click the "Portal Site Connection" link, select the radio button to "Connect to Portal site", enter the URL and name, you're done.  Fixed my problem. 

    KevinHou

    • Marked as answer by KevinHou Tuesday, February 8, 2011 8:09 PM
    Tuesday, February 8, 2011 8:09 PM