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...


2 Answers 2


Check this script to pre-provision MySites.

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

  • thanks toni, i'll try this... btw, is there a way to do it directly on the code behind? Mar 23, 2011 at 4:23
  • Yes, you could use the same code and rewrite it for .NET Mar 23, 2011 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="http://schemas.microsoft.com/sharepoint/">
  <FeatureSiteTemplateAssociation Id="GUIDOFLISTFEATURE" TemplateName="SPSPERS#0" />

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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