X

SharePoint

What is claims-based authentication?

Before going on with my other posts I want to introduce you claims-based authentication that makes is way to almost all Microsoft web-based platforms around. It is more complex than old username-password method but also more secure and general. In this posting I will give you short and not very technical overview about claims-based authentication.

Hide ribbon using SPSecurityTrimmedControl

In one of my current SharePoint 2010 Foundation projects I needed to hide ribbon from anonymous users. Visitors, contributors etc must see ribbon on all pages where it shown by default. In this posting I will show you how to hide ribbon usingSPSecurityTrimmedControl.

Creating custom menus to SharePoint sites

Sometimes we need custom menus in our SharePoint sites. In this posting I will show you how to add custom xml-based menu to your master page and make it work with SharePoint.

Using SharePoint client object model

SharePoint 2010 has powerful client object model that you can use to write external applications that use SharePoint data. In this posting I will show you how to get data from lists using client object model and how to optimize queries to save some bandwidth.

Using SPSiteDataQuery to find list items by unique ID

In one of my projects I had to search for list item from current site collection by its unique ID that is kept in database as GUID. In this posting I will show you how to query list items by unique ID over current site collection.

Unable to locate the xml-definition for CType with SPContentTypeId

When deploying your SharePoint solution to your development or test server where solution has been deployed before you may find errors like these in SharePoint log:Unable to locate the xml-definition for CType with SPContentTypeId and Failed to find the content type schema for ct-0-0x010100 during template lookup.

Session state can only be used when enableSessionState is set to true, either in a configuration file or in the Page directive

When IIS is not configured properly after creating SharePoint application and there are web parts or features that use session you may get the following error: Unexpected error occured: System.Web.HttpException: Session state can only be used when enableSessionState is set to true, either in a configuration file or in the Page directive. Please also make sure that System.Web.SessionStateModule or a custom session state module is included in the \\ section in the application configuration. Solution As a solution you must register session state handler module in IIS. Open Internet Information Services manager. Move to site where problem occurred. Open modules…

Failed to get value of the "Approval Status" column from the "Moderation Status" field type control

When upgrading site from SharePoint 2007 to SharePoint 2010 or if somebody has tried to be extreme smart-ass you may get the following error when saving item or document to list where content approval is turned on: Failed to get value of the "Approval Status" column from the "Moderation Status" field type control. See details in log. Exception message: Input string was not in a correct format.

Could not find any resources appropriate for the specified culture (or the neutral culture) on disk

When you are building site definitions with localization support you may get the following error when creating new site: Provisioning did not succeed. Details: The site template was not provisioned successfully. Delete this site collection in Central Administration, and then create a new site collection. OriginalException: Could not find any resources appropriate for the specified culture (or the neutral culture) on disk.

The program w3wp.exe, with the assigned process ID, could not authenticate locally by using the target name HTTP/WEBSITENAME.

You may face this error when you are running your development environment on virtual server where you have also configured alternate access URL-s.The full message is something like this: “The program w3wp.exe, with the assigned process ID, could not authenticate locally by using the target name HTTP/WEBSITENAME. The target name used is not valid. A target name should refer to one of the local computer names, for example, the DNS host name. Try a different target name.”