Wednesday, November 28, 2012

Apps for SharePoint 2013 - Client and Server-side code

It's about time I blew the dust off this blog. Tonight I did a presentation at the Melbourne SharePoint User Group entitled Apps For SharePoint (2013). It included two demos based on the App For SharePoint 2013 solution template in Visual Studio 2012.

The two demos illustrated how you can create a separate ASP.Net Web Application. Demo 1 showed how easy it is to hook in to SharePoint to obtain List properties via server-side code (populating an ASP.Net Repeater Control). Demo 2 showed what you can do with SharePoint 2013's Javascript hooks. Specifically, using SP.UI.Controls.js from the /_layouts/15/ SharePoint folder to pull chrome elements out of SharePoint, and render them in your ASP.Net web app.

No animals were harmed in the making of these demos, but a few articles kindly provided on the Microsoft MSDN site helped put it together:
Tweet me @mpowney if you have any questions.

Saturday, August 13, 2011

SharePoint 2010 Content Migration - PDF icons don't appear in document libraries


When a document library includes PDF files, by default these file’s icons are displayed with the generic “blank” icon.


  1. Upload the .gif file for the PDF icon to C:\Program Files\Common Files\Microsoft Shared\Web server extensions\14\Template\Images

  2. Update the Docicon.xml file in the following folder C:\Program Files\Common Files\Microsoft Shared\Web server extensions\14\Template\Xml\ to include the following node: <Mapping Key="pdf" Value="NameofIconFile.gif"/>

  3. Restart IIS after making the change

Details on how to perform this for all versions of SharePoint are available at this Microsoft KnowledgeBase article.

SharePoint 2010 Content Migration - Custom Content Query Web Part doesn’t show some Lookup data from underlying list


Fields used in a custom CQWP that are of "Lookup" type don’t render out correctly. This occurs when the CQWP is designed to strip extraneous information from the values of the Lookup field


Updates to the custom CQWP .webpart file, and the associated XSLT file are required. Ensure the .webpart file refers to the Lookup field as a “Lookup” type in the CommonViewFields node, and update the XSL file associated to the CQWP to no longer remove characters prior to a “#” character (SharePoint 2010’s CQWP parses the data from a Lookup field without the pure “2;#Value” style rendering, instead the looked up value comes out in the CQWP as “Value”)

SharePoint 2010 Content Migration - Left-hand Navigation of site displays "Error"


Immediately after doing an DB Attach upgrade of content, the newly mounted site collection(s) display the word “Error” in the left-hand navigation.


Perform an “iisreset” on the web server

SharePoint 2010 Content Migration - Discussion Boards web parts don’t function


Discussion Board web parts that exist on pages throughout the site don’t work. When you select a link to view a Discussion Board thread, the link doesn’t send you to the thread details. Instead it sends you back to the same page, but the Discussion Board web part is emptied


Ensure SharePoint Server 2010 SP1 and the SharePoint Server 2010 June 2011 Cumulative Update is installed prior to performing the db attach upgrade.

Thursday, August 11, 2011

SharePoint 2010 Content Migration - Broken images on Contact Details web part


If you're migrating some content from your MOSS 2007 environment, but staff photos are remaining at their original location, profile data included in content (i.e. in Contact Details Web Parts) may include source addresses that are updated via the database-attach approach to refer to the new 2010 site collection’s host name.


Possible resolution is to ensure a profile sync is done from Active Directory and subsequently perform profile sync to site collections (run the respective Timer Jobs), after the site collection is migrated

SharePoint 2010 Content Migration - links that use relative URLs


Some links defined in the content of sub-sites refer to relative URLs for pages outside of the Team Centre site collection.


  1. Request site owners to update links in navigation, so absolute paths including hostnames are used instead of relative links (to be performed retrospectively, after content migration has occurred)

  2. Implement redirect handling on the SharePoint 2010 site(s) to “catch” any requests to the relative address