Archives / 2009 / March
  • How to make Live Mesh conquer the world...

    Tags: Microsoft, Microsoft Office, Internet and the Web, Windows Live, Live Mesh

    Today almost everyone have more than one computer; one at work, a few at home, a media center, a PC, a Mac etc, your family members, friends and colleagues have the same. One problem is that a lot of us need access to files on one machine when we are using one of the others. For example I want to access my images when I’m at work sometimes and I do not want to copy all of these images onto my work laptop, when I’m at home I want to have the same favorites and documents that I use at work and so on. Then I have another scenario, let’s say that I do not have any of my computers with me and I want to access one of my files, then I want to have some way to access the files using a standard browser - and why not have editing possibilities.

    There are several ways to accomplish this, but none (that I discovered) covers all of these scenarios. Today I use a mix of services from Microsoft (there are other vendors with similar services, but none as good IMHO); Live Mesh, Office Live Workspaces, Live Skydrive and Live Sync. Read my previous post which compares some of these features.

    Live Mesh synchronizes folders between my machines as well as keeps a copy of it in the cloud. Live Sync synchronizes between the machines only. Office Live Workspaces allows me to store, share and access Office documents, lists and calendars in the cloud. Skydrive is currently a backup repository in the cloud. This pretty much covers it all, but has a few problems:

    1. I need to have several applications/services installed
    2. I need to go to different web sites to configure or access files
    3. They all use different storage mechanisms
    4. The synchronization (Mesh, Live Sync) always make a bi-directional synchronization

    Why not take these services and make one über-Mesh and add some additional features. Take the Live Mesh application and add this features then you would have a synchronization service that would take the world with storm.

    Modify Live Mesh in the following ways

    1. Merge the Skydrive storage with the Mesh storage - then we will go from 5Gb to 25Gb online storage
    2. Allow the Mesh folders to synchronize only between the computers and not the cloud, like Live Sync. I do not need all my files available in the cloud. For example I use Mesh to have some applications synched across my machines, just like Andrew Connell does.
    3. Allow you to set how the files will be synchronized; one-way or bi-directional. For example I only want my images taken with my mobile phone to be copied to the mesh, not to synchronize all images with the phone. This should be a setting per device and folder
    4. Today in Live Mesh you can only add top-folders, it would be awesome if you could make your own folder structure and set the synchronization options per folder
    5. Integrate the Office Live Workspaces folders into the Live Mesh
    6. Integrate the upcoming Office Live Applications into the Live Mesh, the opportunity to edit my Office documents using a browser only would really rock
    7. Have a REST based API to the Live Mesh - then all vendors could Meshify their applications
    8. Make the Live Mesh WebDAV compliant, then I could use any Office application from anywhere and edit my documents directly in the Mesh, without having to synchronize the folders
    9. Keep the Live Mesh RDP access
    10. Keep the Live Sync remote folder access
    11. Keep the Live Sync file size limit, Skydrive does not allow upload of large files

    Anything else you would like to have?

    Of course I realize, and don’t mind, that some of these services should have some fee; for example the Office Live Applications integration could have some fee and extra storage space (25Gb is not that much in these days) should also cost.

    I’ve even tried the Live Mesh CTP version, which have support for custom applications - which looks awesome, throw that into the wish-list also.

    So, Microsoft Program Managers hear me! Now when Ray Ozzie is in partial command in Redmond I think this should have a high priority (anyone remember Groove?)

    I do not think I am the only one out here that would just love to see this happen.

  • Having fun with the SharePoint Welcome.ascx control

    Tags: SharePoint

    SharePoint Welcome Control Have you ever wanted to get rid of the Welcome text before the user name in the SharePoint user menu? At least I have! If you are like me - here is a solution that you can use to customize the text of the Welcome Control (Welcome.ascx).

    The approach is pretty simple, and can be made in several ways, but I wanted a pretty clean solution that didn’t affect any other behavior of SharePoint and I wanted to write as little code as possible. Eventually I ended up with some more rows than expected, but this was due to the fact that I created this custom Welcome control configurable and deployable.

    First of all some basics about the Welcome control. The Welcome.ascx control is a special control that handles the user menu, located top right (as standard) in your SharePoint site. The control has two states; one if the user is signed in and one when the user is not signed in. The Welcome.ascx control is located in the 12-folder under TEMPLATE\CONTROLTEMPLATES and uses the Microsoft.SharePoint.WebControls.Welcome control class in the Microsoft.SharePoint DLL file.

    What I wanted to do was get rid of the Welcome text in front of the user name and only have the user’s name. To achieve this without recreating the whole control, I created a new class which derives from the Welcome control and changed the Welcome.ascx file to inherit from my new class instead.

      1: namespace ManagedWelcome {
      2:     public class Welcome : Microsoft.SharePoint.WebControls.Welcome {
      3:         protected Welcome() {
      4:         }
      6:         [SharePointPermission(SecurityAction.Demand, ObjectModel = true)]
      7:         protected override void OnLoad(EventArgs e) {
      8:             base.OnLoad(e);
     10:             if (HttpContext.Current.User.Identity.IsAuthenticated) {
     11:                 PostCacheSubstitutionText pt = base.ExplicitLogout.MenuControl.Controls[0] 
     12:                                                as PostCacheSubstitutionText;
     13:                 pt.TextType = PostCacheSubstitutionTextType.UserName;
     14:             }
     15:         }
     16:     }
     17: }

    The original Welcome control consists of two objects; ExplicitLogout (of the type PersonalActions) and ExplicitLogin (of the type ApplicationPageLink). In line 13 I change the TextType property (enumeration of type PostCacheSubstitutionTextType) of the first control (which is of the type PostCacheSubstitutionText) in the ExplicitLogout object and set it to show only the user name (UserName enum value), default is the WelcomeUser value.

    Now the Welcome control looks like this instead.

    No Welcome text!

    As always I cannot stop there so I made this into a customizable control, download below, which can be deployed to your web application. When activated, on Site Collection Features, it adds a link to the Site Collection Administration (not the best place, since the changes will affect the whole web application).

    Site Collection Administration

    When you click that link you will get to a Welcome Control administration page, where you can set the behavior of the Welcome control when a user is logged on or change the Sign In text.

    Welcome Control admin

    Using this feature you can on the fly change the behavior of the Welcome menu; have a custom Sign In text, change the welcome text to just the user name, the user login name, or e-mail and even the name of the Web.

    Note: When installing this feature it will write over the default Welcome.ascx control, so make a backup of it first.

    For full source download click here or just the solution package (WSP) click here.

  • Ten free sample Themes for SharePoint

    Tags: SharePoint

    Microsoft has released a set of ten free Themes for SharePoint for use with the Visual Studio extensions for Windows SharePoint Services.

    10 Themes Preview

    These ten themes provides a far better experience than the out-of-the-box themes delivered with SharePoint (WSS and MOSS), of which some are really annoyingly ugly!  But the new themes needs some tweaking before looking really good, there are several design flaws in some of them, like black text on dark-grey background…

    The themes are not delivered as SharePoint solutions, but as Visual Studio 2008 solutions for usage with the VSeWSS. So you can’t just download and install them, you have to build them and optionally customize them. This allows you to easily grab a solution, customize it a bit and then package and deploy it.

    To download the themes go to:

  • ChartPart 2.0 for SharePoint Beta released

    Tags: SharePoint, Web Parts

    ChartPart 2.0 betaI’m glad to announce that I finally got my stuff together and stitched together the last pieces of the beta of ChartPart for SharePoint 2.0.  ChartPart for SharePoint is a SharePoint Web Part that allows you to draw charts from existing SharePoint lists. It’s available at CodePlex, at, and is free for use.

    ChartPart 1.0 have had over 4.000 downloads since it was released and is translated to six different languages. The first version was pretty limited in customization and you could only create some basic charts.

    Version 2.0 has a number of new and interesting features

    • Installation in bin, instead GAC. This is to make the Web Part more reliable by enterprise customers
    • The Chart Controls is installed separately
    • More chart types
    • A set of new and improved Editor Parts that allows you to customize your Chart
      • Full control over the 3D graphs
      • Full control of legends position and layout
      • etc
    • A new LockDown mode, which allows you to lock down the design parts of the ChartPart so that an administrator can set colors and design and the allow users to use those predefined Web Parts without violating corporate branding etc
    • Connect the ChartPart to a list and use the list as a filter for the chart
    • Even more languages will be there when a stable version is released

    It’s a beta, and I have some issues still to fix and some features to implement, but head on over to download it if you would like to try it out, head on over to CodePlex and download the beta. Post any issues in the Discussions or Issue Tracker. If you would like to help out translating it just contact me.

  • SharePoint Web Part Event Flow in detail

    Tags: .NET, SharePoint, Web Parts

    I have been answering questions on the SharePoint forums at MSDN Forums, and while some are really tricky and interesting, some are really basic beginner mistakes. A couple of questions lately have been about Web Part development and how to and where to create your controls. Most of these is easily solved if you understand how the Web Part event model works.

    First of all you need basic ASP.NET understanding and know how the Page and Control objects work together, how a postback works etc. But I have even seen somewhat experienced ASP.NET developers failing at this point, probably due to the fact that Visual Studio have a slick interface for editing user controls and ASP.NET pages. When it comes to SharePoint you have no visual aids and you are out on thin water, and this knowledge is crucial.

    SharePoint Web Part - Event Flow chart

    To help new (or experienced) SharePoint Web Part developers out I created a chart that shows you how the different events flows from the Page, through the WebPartManager and WebPartZones, to the Web Part.


    You can either click on the image above, to get it as a JPEG image, or download it as a printable PDF or XPS file.

    Note: The Event Flow chart does not cover all events in the ASP.NET/SharePoint Page model, I have focused on the WebPart side.

    There are five segments in the chart, from left to right;

    • Page - events/methods happening in the Page (System.Web.UI.Page derivatives)
    • WebPartManager - events/methods in the SPWebPartManager (inherited from WebPartManager)
    • WebPartZone - the WebPartZone does not do really much in this scenario but rendering the WebParts.
    • WebPart - the events happening during a normal view of a WebPart
    • WebPart Postback - the event flow is a little bit different than the normal WebPart flow. Note that CreateChildControls is before the OnLoad and connections.

    The chart contains a few white notations; these are not actual events/methods but contains information on what is happening at that point.

    If you have any suggestions or comments about the flow, please feel free to contact me or post a comment. I’ll gladly keep the chart up to date.

  • Why you should not allow users to Close Web Parts

    Tags: SharePoint, Web Parts

    A Web Part, in SharePoint or not, has a Verb that allows the Web Part to be Closed. Closed means that the Web Part is just closed (not rendered) and not deleted, which is a separate Web Part Verb. Closing Web Parts can cause headache for your users and even a really bad performance.

    Note: To delete a Web Part you have to go in to Edit mode for the page. Close can be done directly from the Web Part menu.

    Headache for your users

    Advanced Web Part gallery and options When you close a web part it is visually removed from the page and can only be retrieved back by appending ?Contents=1 to your web part page URL or by editing the page, click Add a Web Part, click Advanced Web Part gallery and options and then select Closed Web Parts. None of these options are intuitive and my guess is that not many administrators or users are aware of this.

    Most probably your users will end up creating and configuring a new Web Part, which eventually will be closed also, and so on.

    This will make your Web Part storage grow and after a while your page will start to perform bad. It can get even worse when you allow the users to customize their own pages.

    Bad performance

    Why does the page perform so badly when you have a lot of closed Web Parts? The answer is twofold; first of all it takes storage and resources to handle these closed web parts and secondly the closed Web Parts are actually created on every page load! They are not rendered but the Web Part Manager control creates all Web Parts (closed or not) during the pre render phase and checks if any of the Web Parts has any client scripts that needs to be registered with the Web Part Page Services (WPSC) framework.

    Note: if you are creating your own Web Parts, based on the SharePoint WebPart class, and you do not need to register any client scripts then override the RequiresWebClientScript and return false.

    Nothing else is done with the closed Web Parts, but if you (god forbid) have any initializations in the constructor you can make the situation even worse.


    Fortunately this problem can be solved in a very easy way; you can prohibit a Web Part from being closed by using the built-in Web Part property AllowClose and set it to false (default is true). You can do this in three different ways;

    1. Allow Close You can change the value of the Allow Close property by editing the Web Part and under Advanced you will find an Allow Close check box
    2. If you develop the Web Part yourself then you can override the property in your class
    3. You can modify the .webpart or .dwp file and set the value of the AllowClose property

  • 70-631 passed

    Tags: SharePoint

    After passing the developer exams of WSS (70-541) and MOSS (70-542) I thought that I should make the deck complete by taking the configuration exams. Today I passed the first one, Windows SharePoint Services 3.0 - Configuration (70-631). I’m mainly a developer so I had some worries about questions on DNS, network configs and load balancing. But this exam was too easy and kept at a very basic level. I missed one question though. All of these exams follow the same pattern - I whish the creators of them had some more imagination and creativity.

    The exam felt a bit out of date since it had some questions referring to MOM 2005 and the HTML viewer (which has been missing from MS downloads for some time, if anybody has any statement on this please comment).

    So now it’s just one more to take, before the SharePoint 3.0 life cycle comes to an end, then we have to start over…

  • Office Labs - Canvas for OneNote

    Tags: Microsoft Office

    Canvas for OneNote is another new and interesting innovation from the Office Labs team. Canvas for OneNote creates a new way for you to manage your OneNote section and pages in a more “inspirational” and “irregular” way.

    OneNote is traditionally organized into Note books, sections, groups, pages and subpages - just like a classical book shelf filled with note books. It works really nice if you know in which note book you placed your notes (of course you can search to find it…faster than you search your shelf). This feels a little bit old-school to me and I still have a lot of hand notes and documents spread out over my desktop (not the Windows desktop, a real physical one) organized in a very strict chaotic order.

    Canvas for OneNote is one step forward to keep your notes in a more irregular order and to view them in a more visual way. You can see all your notes/pages just as you would put them on a desktop and drag them around and organize them into groups to cluster related sections and pages together. By zooming in and out you can really fast find and edit the notes. One interesting feature is to use the time line mode, which highlight the pages changed within a specified time period.

    Canvas for OneNote

    Canvas for OneNote is right now an experimental project and has some show stoppers, for me who is an OneNote addict. You can only import (makes a copy of) one OneNote section (I use several ones), it drains the battery of your computer (normally draw notes on meetings without power supply) and I think that a search function should be there. But the team are right on track - I really would like to see something like this in upcoming versions of OneNote (read OneNote 14).

    This type of interfaces is something we need to see more of, don’t you agree. And I really would like to see it in other applications/systems. Just look at this interface from Bumptop - imagine that on a Tablet PC.

  • SharePoint Online available worldwide

    Tags: SharePoint

    At CeBIT 2009 it today was announced that SharePoint Online is now available worldwide*. SharePoint online is a part of the Business Productivity Online Suite which also contains Exchange Online and Live Meeting. More services will be available at a later date.

    There is a free 30 days trial option if you would like to try it out, which I really recommend, before you subscribe/buy the solution.

    You can find more information about the Microsoft Online Services at

    * These are the possible countries: Austria, Belgium, Canada, Denmark, Finland, France, Germany, Ireland, Italy, Japan, Netherlands, New Zealand, Norway, Portugal, Spain, Sweden, Switzerland, the United Kingdom and the United States

About Wictor...

Wictor Wilén is the Nordic Digital Workplace Lead working at Avanade. Wictor has achieved the Microsoft Certified Architect (MCA) - SharePoint 2010, Microsoft Certified Solutions Master (MCSM) - SharePoint  and Microsoft Certified Master (MCM) - SharePoint 2010 certifications. He has also been awarded Microsoft Most Valuable Professional (MVP) for seven consecutive years.

And a word from our sponsors...