none
casting mysite as SPSite RRS feed

  • Question

  • hi,

    In SharePoint 2013, can I cast mysite to SPSite? in other words, is mysite an SPSite or an SPWeb?

    Thanks in advance,

    Abdelfattah.

    Sunday, April 16, 2017 12:20 PM

All replies

  • Hi

    mysite is a personal site , and not a site collection , So mySite is a SPSIte not a SPWeb

    https://sharepoint.stackexchange.com/questions/23241/getting-my-head-round-spsite-vs-spweb-vs-anything-else

    https://social.msdn.microsoft.com/Forums/office/en-US/63b37082-9b93-48db-8bdb-6e38dd036a50/difference-between-spsite-and-spweb?forum=sharepointdevelopmentlegacy


    Romeo Donca, Orange Romania (MCSE, MCITP, CCNA) Please Mark As Answer if my post solves your problem or Vote As Helpful if the post has been helpful for you.

    Sunday, April 16, 2017 1:27 PM
  • Hi Romeo,

    many thanks for your reply.

    How is mysite not a site collection and it is an SPSite at the same time?? based on my knowledge and the links you have sent me all of them say that SPSite is a site collection. Could you explain please?

    regards,

    Abdelfattah

    Monday, April 17, 2017 7:27 AM
  • Hi

    as an example, when you create a site collection ( for example the first root site collection in a web app ) that is a site collection but a site as well

    When you create a subsite inside it , that is only a site not a site collection


    Romeo Donca, Orange Romania (MCSE, MCITP, CCNA) Please Mark As Answer if my post solves your problem or Vote As Helpful if the post has been helpful for you.

    Monday, April 17, 2017 7:54 AM
  • hi,

    Romeo, you have every right about the second reply, which is the first root site collection in the web application is a site collection :), and any other created subsite inside the first one is a website (which is not a site collection), till this point we agree on.

    But I'm asking about the first reply you wrote, how come mysite is not a site collection and it is an SPSite (which refer to site collection) there is a confusion

    regards

    Monday, April 17, 2017 8:04 AM
  • Hi again

    reading again my first answer I saw that I 've made a big error , replaced the SPxxx  positions ;)

    MySite is a site , and using the object model is a SPWeb


    Romeo Donca, Orange Romania (MCSE, MCITP, CCNA) Please Mark As Answer if my post solves your problem or Vote As Helpful if the post has been helpful for you.


    Monday, April 17, 2017 8:20 AM
  • hi,

    Thank you very much, but your first reply still has the error.

    Regards,

    Monday, April 17, 2017 8:38 AM
  • Hi Abd,

    MySite is a site collection, and you need to use SPSite to retrieve the MySite of a user.

    Best Regards,

    Victoria 


    Please remember to mark the replies as answers if they help.
    If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com

    Tuesday, April 25, 2017 9:30 AM
    Moderator