A member of the Microsoft.SharePoint namespace, SPSite represents a collection of sites in a Web application, including a top-level Web site and all its subsites. Each SPSite object, or site collection, is represented within an SPSiteCollection object that consists of the collection of all site ...

learn more… | top users | synonyms

0
votes
3answers
2k views

SPSite and SPWeb object dispose inside foreach loop

I have a code that loops through all the Sites and Webs in a web application. My code uses for..each loop to navigate through each site and web object. I was wondering if we are required to dispose ...
3
votes
3answers
1k views

SPSite.Exists returning true for a just deleted site collection

Short story - I have a process that creates some sitecollection, so to test it I keep deleting and recreating the same site over and over. The process includes a check with the istruction ...
2
votes
2answers
130 views

Need comments for code within SPSecurity.RunWithElevatedPrivileges

I am investigating the below code to make sure if its quality is as per Microsoft standards. Actually Comments came from Microsoft code reviewer that we need to create new SPSite Object within the ...
2
votes
2answers
2k views

Powershell Enumerate through all site collections but not include one specific site collection

I am partially not even sure how to Google this question because whatever I type never seems to bring back any relevant search results. I currently have a working script that is set to go through and ...
1
vote
1answer
57 views

Error Acessing Remote SharePoint 2010 sites within same network from .NET 3.5 Windows Application

We have been working on a .NET Windows Application for doing Admin tasks and some validation in SharePoint 2010 , since the tool needs to have the functionality to do a site backup and restore I have ...
0
votes
4answers
440 views

SPSite URL value

Hello I am trying to fetch a list item and want to know if this is a good practice. SPSite spsite = new SPSite(SPContext.Current.Web.Url); SPWeb spWeb = spsite.RootWeb; ...
0
votes
1answer
766 views

What is difference between SPSite.Url and SPSite.RootWeb.Url

What is difference between: SPSite.Url SPSite.RootWeb.Url If both are same, Which is considered to be good practice?