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

1
vote
1answer
22 views

Determine if object is SPSite or SPWeb

I have a simple question, how to determine with PowerShell if a SharePoint Site is a SPSite object or SPWeb? I get all Site followed by user but some are SPSite.
0
votes
1answer
76 views

how to get spsite title only

Right now my code gets the URL from my SPSite but I only want to get the Title var url = portalUrl.Text; if (SPSite.Exists(new Uri(url))) { using (SPSite oSiteCollection = new SPSite(url)) { ...
1
vote
0answers
38 views

Programmatically created SPWebApplication's WebParts not registered as safe

I am having a frustrating issue with a programmatically created web application in which a programmatically deployed solution's web parts are not registered as safe when adding to a programmatically ...
1
vote
0answers
18 views

Best practice for re-using the SPWeb object across code layers/services

I have several services that use the SPWeb object. These services are called to perform various functions, sometimes completely unrelated. i.e. an AuthenticationService uses SPWeb to get information ...
0
votes
0answers
12 views

calulate dynamic url according to the zone

I have created a new url for Custom zone of a Site Collection using Set-SpSiteurl. I have a Visual Web Part which displays items in a custom list. Each item in this list has a SPFieldUrlValue. I would ...
0
votes
0answers
56 views

Cannot connect to my SPSite

I'm facing a strange issue. I have a console application project and added assembly Microsoft.SharePoint from C:\Program Files\Common Files\Microsoft Shared\Web Server ...