SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

i would like to know how to dynamically create a personal site without redirecting the user to /_layouts/mysite.aspx?

The requirement is this: - create a list in the user's private mysite (MySite - Contents - List) - if mysite is not yet created, create mysite as in /_layouts/mysite.aspx

hopefully somebody can help me with this...


share|improve this question
up vote 1 down vote accepted

Check this script to pre-provision MySites.

Please note: I haven't tested this script, just posting it as an idea.

share|improve this answer
thanks toni, i'll try this... btw, is there a way to do it directly on the code behind? – SPNotSoNewbieNow Mar 23 '11 at 4:23
Yes, you could use the same code and rewrite it for .NET – Toni Frankola Mar 23 '11 at 10:29

If your requirement is that a user's mysite has a list in it when the user first accesses it, I say go with FeatureStapling. Create a (Web scoped) feature that creates your ListInstance (and if list = custom, the List definition of course), then create another (Farm scoped) feature that staples your list instance feature to the SPSPERS#0 site definition:

<Elements xmlns="">
  <FeatureSiteTemplateAssociation Id="GUIDOFLISTFEATURE" TemplateName="SPSPERS#0" />
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.