Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

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

thanks!

share|improve this question

2 Answers 2

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? –  SPNewbie 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="http://schemas.microsoft.com/sharepoint/">
  <FeatureSiteTemplateAssociation Id="GUIDOFLISTFEATURE" TemplateName="SPSPERS#0" />
</Elements>
share|improve this answer

Your Answer

 
discard

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.