Just today I wondered why something was not working with a specific custom code and was able to track the problem down by debugging to using PublishingWeb.IsPublishingWeb -method to a web in another site collection with read-permissions. The error message was somewhat puzzling, something like:
0×80070002
at Microsoft.SharePoint.Library.SPRequestInternalClass.GetWebUrl(Guid gWebId, String bstrSiteUrl)…..
…
Read more »
I think all artefacts produced in a SharePoint project should be treated as software artefacts. This includes all the UI stuff implemented by designers, such as css files and master pages.
Treating them as software artefacts means that they should be version-controlled. The problem is that there’s no design tool that integrates with TFS, making version control integration with the…
Read more »
Deployment of resource files with SharePoint has always been a little tricky. With MOSS we used features to provision resource files. With SharePoint 2010 it was a little easier but not enough.
There are blogs with some ideas how to make it easier to deploy resources in multiple locations here, here and here….
Read more »
As You know, using PublishingWeb.GetPublishingWeb(web) method causes Access Denied exception for anonymous users. You will also get the same exception if you try to access the PublishingWeb.GetPagesListId(web) or PublishingWeb.GetPagesListName(web) methods.
There are solutions here and here and in many other blogs. These solutions use SPSecurity.RunWithElevatedPrivileges,…
Read more »
You can add keys to spweb propertybag trough a feature using CAML:
<?xml version="1.0" encoding="utf-8"?>
<Elements xmlns="http://schemas.microsoft.com/sharepoint/">
<PropertyBag ParentType="Web" RootWebOnly="False">
<Property Name="MyCustomProperty"
Type="string" Value="MyValue" />
</PropertyBag>
</Elements>
The property is…
Read more »
We encountered a problem which seemed really strange while provisioning our site collection with PowerShell (New-SPSite). Our provisioning contains programmatic custom list creation to our publishing webs via feature receivers. The procedure is that the feature receiver creates the list with a URL friendly Title and then changes the Title to a UI friendly…
Read more »