This project is read-only.

CSC510246. Do not dispose PersonalSite or PersonalWeb.


My Site pages, which implement IPersonalPage, implement these properties as shared instances that should not be disposed of by controls that use them.

IPersonalPage currentMySitePage = this.Page as IPersonalPage;
if (currentMySitePage != null && !currentMySitePage.IsProfileError)
    using (SPWeb personalWeb = currentMySitePage.PersonalWeb)
        // Do stuff
    } // <- do not dispose!


IPersonalPage.PersonalSite property
IPersonalPage.PersonalWeb property

Last edited Jun 26, 2014 at 8:35 AM by dvd73, version 5


No comments yet.