I’ve been looking at this for an hour, wondering what I did wrong:
I’ve created a new SPSite using a site definition. I wanted to connect this SPSite to the portal using the PortalUrl and PortalName properties, so the ‘Up to portal’ link would appear.
SPSite newSite = siteCollections.Add(strUrl,strTitle,"",1043,strTemplate,strUserLogin,strUserName,strUserEmail);
newSite.AllowUnsafeUpdates = true;
newSite.PortalName = "My Portal";
newSite.PortalUrl = "http://myserver/";
No error so far, and this is what the SDK was telling me...at least I thought. The link however, never appeared on my new created site. Ok, what was wrong with my code?
newSite.PortalUrl = "http://myserver/";
newSite.PortalName = "My Portal";
This was wrong.. just switch these two lines of code. Why? No clue. Maybe mention this in the SDK? For now, just my two cents (and an hour). With thanks to Arnold. 