Archive for the “Development and Customization” Category

Alternative for PublishingWeb.IsPublishingWeb

December 19 2012 3 comments

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 »

Integrate SharePoint 2013 Design Manager with TFS

August 13 2012 No comments yet

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 »

SharePoint 2010 Resource File Deployment Done Easy

May 28 2012 6 comments

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 »

Anonymous Access and Publishing Web Pages List

December 22 2011 2 comments

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 »

Remove Keys From PropertyBag on FeatureDeactivating Override

December 13 2011 2 comments

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 »

SPList’s Title Property & SPField’s DisplayName not Updating

November 14 2011 8 comments

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 »
Page 1 of 612345...Last »