Author Archive

SharePoint 2010 Resource File Deployment Done Easy

May 28 2012 8 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 3 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 3 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 »

How to Configure Crawl for Anonymous SharePoint 2010 Site

February 25 2011 32 comments

Are You getting errors like described in Mikes blog? Well atleast I did, and here is one way to fix it.

First of all, you need to have a web application with only anonymous access enabled. You can have it extended to another zone, with windows authentication , to make it available for editing. Here is…

Read more »

Using Event Receiver to Set Default Values for Publishing Pages

March 29 2010 8 comments

While ago I posted something very similar to this. Here

Here’s yet another solution, and way better and faster to implement.
First create web scoped feature, that adds ItemAdded event receiver to Pages library (should’t be a task). In the ItemAdded method, set the default values which are defined in the ContentType, to each field in the…

Read more »

Using Control Adapter to Set Default Values for Publishing Pages

February 24 2010 43 comments

Developers, who use customized page layouts bound with custom content type, have probably realized that if your custom content type is not the default content type of Pages library, you will not get default values populated when you create a new page. One way to work around this is to create feature, which sets your customized content type to be…

Read more »