Questions tagged [spsite]
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 collections in the Web application.
10
questions with no upvoted or accepted answers
1
vote
1
answer
68
views
After create site collection with powershell UI is broken
After creating a site collection with PowerShell UI is broken.
My PowerShell code is
New-SPSite -Url $SiteColl_URL -OwnerAlias $SiteColl_Owner -Language 1033 -Template "CMSPUBLISHING#0" -Name $...
1
vote
0
answers
141
views
Timeout using SPsite object and U2U Caml query
We have 2 collection. 1 is test and other is production environment.
In test collection, I'm writing console application which is using SPSite and SPWeb objects. But it takes nearly 40minutes to get ...
1
vote
0
answers
78
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
0
answers
117
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 ...
1
vote
1
answer
321
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
1
answer
57
views
Exception User-Unhandled, Creation of SPSite objects with a different site id or a different user token is not allowed
I am creating a event handler that will sync documents between two sites on the same site collection when one is uploaded. This is the item added handler.
public override void ItemAdded(...
0
votes
1
answer
714
views
Getting error - Exception calling "Rename" with "1" argument(s): "Could not rename this site collection. The URL specified is already in use."
I'm trying to rename an SPSite to a URL that had been previously deleted.
So I go like this (note - urls redacted)
$site = get-spsite <mysecondurl>
$site.rename('myfirsturl')
However, when ...
0
votes
1
answer
30
views
SPsite returning access error for an url different than the called one
I wrote a small C# .Net 4.5.2 application to rename some doc libraries.
It fails at the very beginning:
using(SPSite sitecoll=new SPSite("http://192.168.0.14:8069"))
with the message
Web ...
0
votes
2
answers
2k
views
I am getting Cannot find an SPSite that contains the following...Error
I have a PowerShell script below:
Add-PSSnapin Microsoft.SharePoint.PowerShell
function Get-DocInventory([string]$siteUrl) {
$web = Get-SPWeb "http://contoso.com/sites/Test10"
...
0
votes
0
answers
300
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 Extensions\14\ISAPI\Microsoft....