Archive for category 2010

LinkedIn and SharePoint…don’t do it

1 Star2 Stars3 Stars4 Stars5 Stars (No Ratings Yet)
Loading...

So I was asked as part of a proof of concept idea to build an optional system for users to display data from there LinkedIn Profile.

No Comments

List Schema.xml Weirdness With Content Types

1 Star2 Stars3 Stars4 Stars5 Stars (No Ratings Yet)
Loading...

Fixing issues with managing columns in list deployed via a schema.xml file based on a content type.

3 Comments

Upload Files with Metadata in Client Object Model

1 Star2 Stars3 Stars4 Stars5 Stars (No Ratings Yet)
Loading...

Alright so after my last post you can now bring SharePoint form fields in to a Silverlight form. But now how do you feed that information back to SharePoint? And how do you add metadata to the file at the same time as the upload? This is how! So you can see we first grab […]

2 Comments

Translate SharePoint Fields to SilverLight

1 Star2 Stars3 Stars4 Stars5 Stars (No Ratings Yet)
Loading...

So having the Silverlight Client Object Model in SharePoint 2010 is great. However, some of the most common requests after rich media with Silverlight and SharePoint regard managing data. However, the built in SharePoint 2010 field types can not directly translate to Silverlight controls. This is an example of how I managed to translate most of the common fields to and from SharePoint and Silverlight. Depending on the type of the SPField being passed the correct form field type gets added to the Silverlight form on the fly.

2 Comments

Checking File Status in an EventHandler

1 Star2 Stars3 Stars4 Stars5 Stars (No Ratings Yet)
Loading...

So a common issue people run in to with file driven event handlers in SharePoint is that the event handler triggers on the SPListItem being added not the file write completion. So oftentimes you’ll get odd issues where unpredictably you won’t be able to access the file within your event handler (typically a NullReferenceException). So here’s a simple example for how to see if the file upload has been completed and added successfully to the list item.

No Comments

Programmatically Add a File in SharePoint

1 Star2 Stars3 Stars4 Stars5 Stars (No Ratings Yet)
Loading...

A simple demonstration function to add a file to an existing SharePoint Library.

10 Comments

Programmatically Set Permissions

1 Star2 Stars3 Stars4 Stars5 Stars (No Ratings Yet)
Loading...

This is some example code I wrote the for the MSDN forums to showcase how you can programmatically set permissions. This code will work for splists or spwebs (in the example it’s SPList permissions, but just changing those calls to go off of Web will switch it). In addition, this shows how to set permissions automatically at feature activation using a SPFeatureReceiver. Double bonus! 😉 Read on for code!

2 Comments

Exporting a SharePoint Site Collection to XML

1 Star2 Stars3 Stars4 Stars5 Stars (No Ratings Yet)
Loading...

This is a repost of something I did on the MSDN SharePoint 2010 forums covering a method for exporting data in a SharePoint site collection to XML. Note that this example does not cover exporting documents or storing navigation/web part settings. It just exports structure and all list items. So if anyone else has a use for this they can use this as a starting place. 🙂

2 Comments

Setting up Claims Based Authentication in SharePoint 2010

1 Star2 Stars3 Stars4 Stars5 Stars (No Ratings Yet)
Loading...

So, finding information (that’s accurate and reliable) for migrating FBA or to a claims based authentication system in SharePoint 2010 seems few and far between. After having done my own claims and FBA migration I thought I’d share my notes for what worked for me.

2 Comments

Example SharePoint 2010 FBA Login Page

1 Star2 Stars3 Stars4 Stars5 Stars (No Ratings Yet)
Loading...

This is an example SharePoint 2010 claims based forms authentication login page. This has all the basic elements you would want, including password reset. Just update the placeholder MyCompany bits with your company information and enjoy! Remember if you include a login page within a solution it needs to go to IDENTITYMODEL\LOGIN and to update the web application properties for which login page to use. 🙂

No Comments