Archives

Archives / 2010 / April
  • Tips for doing SharePoint demos on virtual machines

    Tags: SharePoint, Windows 7, SharePoint 2010, Windows Server 2008, VMWare, Windows Server 2008 R2

    It's Friday and thought that I should share some small tips on how to make your SharePoint demonstration experience better. I assume that you have a quite powerful laptop with virtual machines running SharePoint.

    I used to do my demos directly in the virtual machine, in full screen mode. This requires that I have all the necessary client components installed such as Office, SharePoint Designer, the Windows Server Desktop Experience feature enabled etc. All this of course take resources such as memory and CPU from the virtual machine. Also Internet Explorer consumes CPU cycles and if you're using Firefox in the demo you get another memory hog in your virtual machine.

    A better approach is to use you local workstation as the client, In my case I have Windows 7 and VMWare running (yea, I like to promote them...) the virtual machines. This allows me to show a more realistic case when doing demos.

    The Network

    Networks The first tip here is how to configure the network for the virtual machines. I normally have one AD server and one SharePoint server which are connected using a separate network, so that I can use static IP addresses. Then I have a secondary network on the SharePoint VM which is host-only with known IPs, that is I can access the VM from the client using a browser or an Office application. I also have a third network on the VM which is connected to the Internet. I only enable this third NIC if I need to access web services and such from my VM.

    Then I add entries to the hosts (...\system32\drivers\etc\hosts) file with the IP numbers from the host-guest network so that I can use domain names instead of IP-numbers.

    Authentication

    I never have the host and clients on the same domain. My laptop is connected to my company's domain and the VMs all use their own directories. To get rid of annoying authentication prompts I use the Windows Vista/Windows 7 feature to store credentials - the Credential Manager.

    Credential Manager

    The Credential Manager allows you to save Windows credentials for a specific Internet or network address. Just add the name of the server, which you added to the hosts file, and then your default user username and password. Voila! You can now directly from your client/host browse to your virtual server using a good looking URL and without any authentication prompts.

    Firefox, Safari and other obscure browser does not use this credential manager and I use them to log in as other users.

    If you don't do this and log on to your server from the web browser you will be asked for the credentials every time you open an Office document from the server or when you open the site using SharePoint Designer.

    If you use these small tips you will have a much better experience when doing demos, developing or configuring your SharePoint virtual machines.

    Have a nice weekend!

  • SharePoint 2010 Central Administration Service Application Shortcut Web Part

    Tags: SharePoint 2010

    While fiddling, developing and configuring SharePoint 2010 I use the Service Application management a lot. This requires that you go to Central Administration, click on Manage service applications and then click on the service application that you need to configure or manage. I believe that managing the service applications are one of the most common tasks for people like me (I know some of you readers gets more fired up about the monitoring and upgrade parts of CA though).

    Previously I have use a links Web Part and added all links to the Service Applications to get a shortcut to them. But when you are adding new ones and removing old ones they get new application ids and also new management URLs. This makes me have to update the links Web Part once in a while.

    Introducing Manage Service Applications Web Part

    Therefore I whipped up a small feature that contains a Web Part with links to the management pages for all manageable Service Applications. You can place it anywhere you like in Central Administration, preferable on the CA start page.

    This is how the Web Part looks like. It provides you with a link to the SA management page and also shows the current status of the service application.

    CA Service Application Shortcut Web Part

    Installation

    To install the feature, just download the Wictor.ServiceAppLinks.wsp WSP file and add this to the solution store and then deploy it to the central administration web application/site collection. Go to the Site Collection Features in Central Administration and activate the Manage Service Application Shortcuts. One the feature is activated the Web Part is automatically added to the default page of Central Administration.

    Manage Service Application Shortcuts feature

    When it is deactivated it is also removed from the default page. If you prefer to have it in any other location it can be found in the Web Part gallery, just like any Web Parts.

    Web Part Gallery

  • Plan your SharePoint 2010 Content Type Hub carefully

    Tags: SharePoint 2010

    Currently setting up a new environment on SharePoint 2010 (which was made available for download yesterday if anyone missed that :-). One of the new features of SharePoint 2010 is to set up a Content Type Hub (which is a part of the Metadata Service Application), which is a hub for all Content Types that other Site Collections can subscribe to. That is you only need to manage your content types in one location.

    Setting up the Content Type Hub is not that difficult but you must make it very careful to avoid a lot of work and troubleshooting. Here is a short tutorial with a few tips and tricks to make it easy for you to get started.

    Determine location of Content Type Hub

    First of all you need to decide in which Site Collection to place your Content Type Hub; in the root site collection or a specific one. I think using a specific Site Collection that only acts as a Content Type Hub is the best way, there are no best practice as of now. So I create a new Site Collection, at for instance http://server/sites/CTH/. The top-level site of this site collection should be for instance a Team Site. You cannot use Blank Site by default, which would have been the best option IMHO, since that site does not have the Taxonomy feature stapled upon it (check the TaxonomyFeatureStapler feature for which site templates that can be used).

    Configure Managed Metadata Service Application

    Next you need to create your Managed Metadata Service Application or configure the existing one, Central Administration > Application Management > Manage Service Applications. Select the Managed Metadata service application and click Properties if you already have created it.

    Managed Metadata Service

    In the bottom of the dialog window when you are creating the service application or when you are editing the properties is a section to fill in the Content Type Hub. In this text box fill in the URL of the Content Type Hub. It is essential that you have decided where your Content Type Hub will reside, since once this is set you cannot change it. The only way to change it is to rebuild the whole managed metadata service application! Also make sure that you enter the URL correctly. I did copy and paste the URL once and got the /default.aspx in the URL which funked the whole service up. Make sure that you only use the URL to the Site Collection of the hub.

    Service Application properties

    Now you have to set up so that other Site Collections can consume the content types from the hub. This is done by selecting the connection for the managed metadata service application and clicking properties.

    Service Connection

    A new dialog window opens and there you need to click the Consumes content types from the Content Type Gallery at nnnn.

    Serivce Connections gallery

    Now you are free to syndicate your Content Types from the Hub.

    Publish Content Types

    To publish a Content Type from the hub you need to go to Site Settings > Content Types and select the content type that you would like to publish. Then select Manage publishing for this content type. This takes you to a page from where you can Publish, Unpublish or Republish the content type.

    Publish it!

    Once the content type is published it can take up to an hour for the subscribing Site Collections to get it. This is controlled by the Content Type Subscriber job that is scheduled to run once an hour. To speed up your publishing just go to Central Administration > Monitoring > Review Job Definitions > Content Type Subscriber and click Run now and you content type is very soon available for use.

    Published Content Type status

    You can check the status of the content type publishing in your destination site collections by selecting Site Settings > Content Type Publishing. From here you can force a refresh of all subscribed content types, see which ones that are subscribed and finally check the publishing error log. This error log is very useful for detecting errors during the publishing. For instance if you use any features such as ratings, metadata, document ids in your content type hub and your destination site collection does not have those features available this will be reported here.

    Have a nice weekend...I know what I will be doing...

  • Create SharePoint 2010 Managed Metadata with Excel 2010

    Tags: Microsoft Office, SharePoint 2010

    Building the metadata structure in the Term Store Manager in SharePoint 2010 is not the most convenient way. I prefer working with the metadata structure and terms in an Excel document so that I can discuss the structure with colleagues and clients before implementing it.

    The Term Store Manager allows you to import a comma separated text file containing a Term Set. By default the Excel 2010 Save as CSV does not save in the correct format and for that I have made a Excel 2010 macro enabled template which produces the correct format.

    The Excel document allows you to build a Term Set per sheet, see figure below. It contains a number of columns:

    • Term Set Name - name of term set. Only needed on first row
    • Term Set Description - description of term set. Only needed on first row
    • LCID - the locale identifier. Can be left blank for default LCID
    • Available for tagging - TRUE if the term should be available for tagging otherwise FALSE
    • Term Description - description of the term
    • Level N Term - the name of the term. See figure below on how to build the structure

    Term Set in Excel 2010

    When the term set is ready you click on the new Ribbon tab added by the Excel document called SharePoint 2010 and then select Create Term Store File. Excel will then ask you for a file name and produce an import file for the Term Store from the active sheet.

    Term Store Ribbon tab in Excel 2010

    If you click on Create New Term Store Sheet an new workbook sheet will be added to the workbook in which you can add another term set.

    To import the term set into your Managed Metadata store, create a new Group and select Import Term Set, as in the figure below.

    Import Term Set

    SharePoint will then parse your file and import the term set. And it will look something like this:

    image

    Download the Excel 2010 document

    You can download the macro-enabled Excel 2010 document here. Unzip the file and open the document (TermStoreCreator.xltm) to create a new workbook.

  • A whole lot of SharePoint 2010 guidance available - weekend reading

    Tags: SharePoint 2010

    Documents...SharePoint 2010 is just around the corner and Microsoft is starting to release guidance and planning documents for the new and shiny version. Up until now there has been little guidance on hardware and software limits/boundaries/recommendations of SharePoint 2010 and comparisons with SharePoint 2007. But now when the release is imminent is essential to get up to speed on this. Here is a compilation of some of them that I find really interesting and will take for weekend reading.

    SharePoint Server 2010 capacity management: software boundaries and limits: A huge document with all details of boundaries, supported limits and thresholds of lists, sites, databases, network etc that you need to know about SharePoint 2010.

    SharePoint Server 2010 performance and capacity technical case studies: Two different studies on performance and capacity. One for a publishing intranet and on a collaboration environment. These are actual used implementations of SharePoint at Microsoft.

    SharePoint Server 2010 performance and capacity test results and recommendations: Nine different documents focusing on different scenarios and services with test results and performance characteristics.

    Databases That Support SharePoint 2010 Products: A great Visio diagram describing all the databases in the SharePoint family. Something to decorate your living room with.

    Have a nice weekend everyone. And I hope that the ash cloud disappears so that everyone attending the Evolutions conference will have a good time next week.

  • Create custom Rating icons for SharePoint 2010 Server

    Tags: SharePoint 2010

    SharePoint 2010 contains functionality for rating documents and items using a classic five-star rating approach. But those starts looks a little bit like the Google stars, right?

    Wouldn't it be cool to brand the rating and use custom icons like this:

    The solution is quite easy actually. You need to create a set of images and then set a few properties on the SPWeb object of the top-level site in the Site Collection.

    Images

    First you need four images. Two images used for CSS-sprites and two images used when hovering/selecting the rating. I used the following images:

    This image is used for standard left-to-right rendering of the ratings.

    This image is used for right-to-left rendering of the ratings.

    |

    And these final two images are used when selecting the new rating.

    Deploy it as a feature

    You should deploy everything as a feature, you should know this by now. Create an empty SharePoint 2010 project and add a new Site Collection scoped feature. Then add an Images mapped folder in which you add the four images.

    Visual Studio 2010 solution

    To set the properties of the TLS site in the Site Collection add a new Event Receiver to the feature. Edit the FeatureActivated method and add code like this:

    SPSite site = properties.Feature.Parent as SPSite;
    SPWeb web = site.RootWeb;
    web.AllProperties["ratings_imagestripurl_old"] = web.AllProperties["ratings_imagestripurl"];
    web.AllProperties["ratings_imagestripurl"] = "/_layouts/Images/Wictor.CustomRatings/AlienRatings.png";
    web.AllProperties["ratings_imagestriprtlurl_old"] = web.AllProperties["ratings_imagestriprtlurl"];
    web.AllProperties["ratings_imagestriprtlurl"] = "/_layouts/Images/Wictor.CustomRatings/AlienRatingsRtl.png";
    web.AllProperties["ratings_newratingiconurl_old"] = web.AllProperties["ratings_newratingiconurl"];
    web.AllProperties["ratings_newratingiconurl"] = "/_layouts/Images/Wictor.CustomRatings/AlienRatingsNew.png";
    web.AllProperties["ratings_emptyiconurl_old"] = web.AllProperties["ratings_emptyiconurl"];
    web.AllProperties["ratings_emptyiconurl"] = "/_layouts/Images/Wictor.CustomRatings/AlienRatingsEmpty.png";
    web.Update();

    This will update the properties of the site and also save the original values so that we can restore them in the FeatureDeactivating method, like this:

    SPSite site = properties.Feature.Parent as SPSite;
    SPWeb web = site.RootWeb;
    web.AllProperties["ratings_imagestripurl"] = web.AllProperties["ratings_imagestripurl_old"];
    web.AllProperties.Remove("ratings_imagestripurl_old");
    web.AllProperties["ratings_imagestriprtlurl"] = web.AllProperties["ratings_imagestriprtlurl_old"];
    web.AllProperties.Remove("ratings_imagestriprtlurl_old");
    web.AllProperties["ratings_newratingiconurl"] = web.AllProperties["ratings_newratingiconurl_old"];
    web.AllProperties.Remove("ratings_newratingiconurl_old");
    web.AllProperties["ratings_emptyiconurl"] = web.AllProperties["ratings_emptyiconurl_old"];
    web.AllProperties.Remove("ratings_emptyiconurl_old");
    web.Update();

    All you then have to do is to deploy and activate the feature. Unfortunately you need to recycle the application pool to get the hovering functions to work.

  • SharePoint 2010 - The Developer Tour in Sweden

    Tags: SharePoint 2010

    SharePoint 2010 The release SharePoint 2010 and Office 2010 is imminent and I can already smell them! Microsoft Sweden with André Henriksson will take a tour around our beautiful country and show all the good stuff that is coming for us developers called SharePoint 2010 - The Developer Tour.

    Me and my awesome MVP mate Tobias Zimmergren will help out during some stops of the tour. It's a half day full with developer goodies that you can't miss out on! The tour will stop in Umeå, Göteborg, Sundsvall, Malmö and Stockholm. I will be doing the last stop and that one is after RTM and general availability of SharePoint 2010 so be sure that I will show you the latest and coolest bits of the fantastic SharePoint platform!

    Update: Umeå has been changed to 19th of May and Göteborg has been changed to the 25th of May

    And if you can't get enough of all the great stuff that is crawling out of Redmond there is a full afternoon with web-development by Johan Lindfors (Microsoft).

    See you there!

  • Upcoming engagements of spring 2010

    Tags: Personal, SharePoint 2010, Presentations

    Wictor presenting SharePoint 2010 in Stockholm I'd like to take the opportunity to tell you about some of my upcoming engagements this spring.

    SharePoint 2010 - the Developer Tour - May 17th, Stockholm

    A half day introduction to SharePoint 2010 development arranged by Microsoft in Stockholm. If you are new to SharePoint development or a skilled SharePoint 2007 developer you should not miss this out. Together with Microsoft we will dive into the wonderful world of the new Visual Studio 2010 SharePoint Developer Tools and SharePoint Designer 2010.

    Introduction to SharePoint 2010 - May 20th, Göteborg

    A half day introduction to all the new and awesome features of SharePoint 2010. This is a repeat of the seminar held twice in Stockholm with full venues, arranged by AddSkills with speakers from Microsoft, FAST and Connecta.

    Developer Summit 2010 - June 1st-3rd, Stockholm

    Developer Summit is a two day conference + one day workshop arranged by Cornerstone. I will talk about SharePoint 2010 Composites and take a look at the Business Connectivity Services, SharePoint Designer 2010 and the SharePoint tools for Visual Studio 2010.

    Unfortunately I will not attend any of the big conferences, there are just no time at the moment with the book writing and all but I trust in the Twitterverse and my colleagues to give me the latest news.

    Laters...

  • I am a SharePoint Server MVP

    Tags: Personal, SharePoint

    While commuting home this beautiful afternoon I received an e-mail from Microsoft containing the following:

    Congratulations! We are pleased to present you with the 2010 Microsoft® MVP Award! This award is given to exceptional technical community leaders who actively share their high quality, real world expertise with others. We appreciate your outstanding contributions in SharePoint Server technical communities during the past year.

    I am very, very proud of receiving this award and it gives me a real boost to continue exploring the SharePoint world...

    MVP

    Thanks to all current and former SharePoint MVP's out there - without this SharePoint community I would not have as fun as I'm currently having!

    Time to celebrate...with some book writing this weekend, but first get my daughters bicycles ready for this season!

AWS Tracker

About Wictor...

Wictor Wilén is a Director and SharePoint Architect working at Connecta AB. 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 four consecutive years.

And a word from our sponsors...

SharePoint 2010 Web Parts in Action