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 »
SocialCommentControl is the control, which enables commenting on a page. You can use social commenting feature with the Note Board web part (Social Collaboration > Note Board) by adding the web part onto your page. You would have to have User Profile Service Application provisioned to enable social comments. Comments are stored in the Social DB (SocialComments table) of…
Read more »
A typical requirement from a client is to be able to incorporate their own custom styles for the Rich Html Field. Allowing their public relations department to apply nice text formating for paragraphs with some Comic Sans Hotness might not be the best practice in here, so let’s be careful out there. The best scenario is only to allow custom…
Read more »
This post will address problems with existing content types and their modification.
If you happen to modify old content types and/or their fields you might come into problems regarding making these changes visible in the manner you intended them to be. This will happen when working with existing Sharepoint content and environments/solutions. Or you might add a new field to…
Read more »