My Site Pages and Architecture

This blog posting applies to Microsoft Office SharePoint Server 2007.

MySites are very interesting on many levels.  When you start to think about how to architect, deploy or customize them, you may encounter some initial confusion and a lack of detailed information.  For instance, did you know that your MySite's Home page and the My Profile page are in completely different site collections?  What's up with that?

The reason is that a My Profile page is provided for every user in the portal regardless of whether they have a MySite, or even if MySites is disabled.  Actually, a single page renders every MyProfile page: https://mysite/person.aspx. This page has code that displays a "Home" tab linking to the user's MySite at https://mysite/personal/userid/default.aspx if it exists.  The Home tab makes it appear that these two pages are part of the same site.  But the URLs hint at the truth: the My Profile page is on one site collection, while the user's MySite Home page is on another.

You knew each MySite is hosted in its own site collection, right?  When a MySite is created for a user (see below), that user is added to the Owners group for the new site collection, and is also added to the Site Administrators list.  This user has full power over their MySite.  To customize that is a bit difficult, but possible.

I created a Visio diagram that depicts the relationships between the pages, where profile information is used on them, and how the links between them interact.

Screenshot (click to download the diagram)

MySite page relationships 

What happens when you browse to https://mysite/?

Whenever you browse to https://mysite/, you're redirected to https://mysite/personal/userid/default.aspx through a few steps:

  1. https://mysite/default.aspx inherits from Microsoft.SharePoint.Portal.WebControls.MySiteHostHomePage.  This assembly authorizes the user against the MySite shared service rights (can be enabled/disabled by users or groups), then emits an HttpResponse.Redirect to either /_layouts/MySite.aspx or /_layouts/AccessDenied.aspx, accordingly.
  2. /_layouts/MySite.aspx inherits from Microsoft.SharePoint.Portal.WebControls.CreatePersonalSpace.  This assembly examines the user profile property Personal site
    • If the Personal site property is blank, CreatePersonalSpace creates a new MySite site collection for this user, then stores its relative URL (e.g. "/personal/userid/") in the Personal site property.
    • CreatePersonalSpace then emits an HttpResponse.Redirect to the URL in the Personal site property.
  3. You arrive at https://mysite/personal/userid/default.aspx, where "mysite" is the URL of the web application hosting your MySites, and "userid" is your user id.
    • Note, other configurations could change this URL, such as the Personal Site Location ("personal") and the Site Naming Format (whether "userid" should include your domain.)  These settings are found on the SSP Admin page "My Site settings."

Customizing MySite

Steve Peschka has the best information for customizing MySites, including how to set a custom master page automatically for all new MySites being created... this one's not obvious!  Steve has a very clever approach that uploads an XML file to each new MySite, containing instructions on what should be modified.  Then, a control in the custom master page reads the XML file and performs the customizations.  He explains why this approach is necessary.

His XML spec for customizations provides several things you can do, such as removing/adding web parts and modifying QuickLaunch links.  He doesn't provide a way to change the permissions of the owner... look for another blog posting from me on how to do that when you want to restrict the rights of each MySite's owner.

A Belated Update: the My Settings page

Because I still have a hard time finding this info, here's the explanation of why some customers find that clicking on a user name takes them to the My Site persondetails.aspx page while others only see the simple WSS userdisp.aspx page.

All people links go to https://SiteCollectionURL/SiteURL/_layouts/userdisp.aspx?ID=17&Source=... And this page decides whether to redirect to the My Site provider defined in the SSP that the Web Application containing the content site collection is assigned to based on one of the following rules:

  1. Host name of the My Site web application matches the site from where userdisp.aspx is called (i.e. both web applications are running on different port numbers)
  2. The site collection where userdisp.aspx is called from has a Portal Connection setting which is set to the My Site url (this would add the My Site to the start of the breadcrumb navigation for OOTB master pages which most customers don't want).

From Ian Morrish at https://www.wssdemo.com/Blog/Lists/Posts/Post.aspx?List=b853926a%2Db04e%2D4620%2D94e4%2D88a5d56cb262&ID=427&Web=d47402ad%2D1767%2D42ba%2Da072%2D133479a9bb5a.  Ian describes the situation in detail, plus an unsupported fix.  A supported method extends his approach to use a delegate control: https://solutionizing.net/2008/12/08/user-profile-mysite-redirect-via-delegate-control/.  This references a CodePlex solution created to do this, at https://www.codeplex.com/Solutionizing/Release/ProjectReleases.aspx?ReleaseId=20923.

See also
To enable/disable MySites,
Managing MySite Creation and Usage .
If MySites are disabled,
Where is My Picture stored? What if MySites are off?