Skip to main content
SharePoint Evolved, Small Steps for a Big Solution

Blog

Go Search
Home
Blog
Wiki
Contact
Themes
  

SharePoint Evolved > Blog
Working with Windows Live Authentication and SharePoint
Working with Windows Live Authentication and SharePoint

I recently began a quest, deciding how to use a domain that I purchased recently. I came upon the idea of using Tobias Zimmergren's Discussion web parts as a starting point for an online discussion for SharePoint Users. Not a huge undertaking, but it did present a problem. Account management for any public site can be difficult, considering SharePoint's structure it can be even more so. After weighing Active Directory in Creation Mode, Straight SharePoint Security and more universal authentication mechanisms, I decided to try out Windows Live Authentication. Two options that are under consideration are Facebook Connect and OpenID.

    After deciding to go with Windows Live Authentication, I then set about researching options for using WLA with SharePoint. I came up with three options, the first being the Community Kit for SharePoint's solution which was released over two years ago and has not had a major release in a while. The second is a project by Wictor Wilen of the Swedish SharePoint Community which was announced this past April. The last is a trialware solution by Shetab Tech which is a commercial product with a price tag of $269.

CKS Windows Live Authentication

I downloaded and installed the solution and followed the instructions to configure it correctly. Following the instructions can be a little counter intuitive and while is sets up the default zone for windows live authentication, it may not be the desired result in a multi-zone installation. Once I got this up and running the only thing left to do was to enable anonymous access and set up user permissions. Being that this was my first attempt setting up Windows Live Authentication for SharePoint, I hit many snags and issues. Some are well known within the SharePoint Community including assembly caching, others involved correct parameters and web.config settings.

I have found that deviating from the instructions a bit is the easiest way to get CKS WLA up and running. I used the following web.config settings as opposed to the recommended instructions.

Recommended:

<membership defaultProvider="LiveID">

 

<roleManager defaultProvider="LiveRoles" enabled="true" cacheRolesInCookie="true" cookieName="liveroles">

 

I Used:

<membership>

<providers>

<add name="LiveID" type="CKS.WindowsLiveAuthentication.LiveMembershipProvider, CKS.WindowsLiveAuthentication, Version=1.0.0.0, Culture=neutral, PublicKeyToken=b5adbad25a892e4a" />

</providers>

</membership>

<roleManager>

<providers>

<add name="LiveRoles" type="CKS.WindowsLiveAuthentication.LiveRoleProvider, CKS.WindowsLiveAuthentication, Version=1.0.0.0, Culture=neutral, PublicKeyToken=b5adbad25a892e4a" enabled="true" cacheRolesInCookie="true" cookieName="liveroles"/>

</providers>

</roleManager>

 

 

Windows Live ID for SharePoint

After adding the solution and deploying to the server and configuration for this solution was a lot more straightforward and used an application page in Central Administration page. The process is pretty self explanatory but the documentation is robust for an open source project. Installation consists of activating a couple features at the site and farm level, the easiness of this installation is a major plus of using this project.

 

 

Short Comparison
 

CKS Windows Live Authentication

Windows Live ID for SharePoint

Farm Configuration

Application Page in Central Administration

Command line with STSADM

Site Configuration

Application Page in Layouts

Part of STSADM Command Line Setup

Administration Web Parts

N/A

All Members, Last Logged In Members, Last Updated Members, New Members

Security Groups

Authenticated Live Users

Authenticated Live User, Live Users, Unapproved Live Users, Locked Live Users

 

Shetab WLA for SharePoint

This product looked interesting from its website, but this is actually a commercial product which put it out of the running for this no budget project. I think it deserved inclusion in this short list of Windows Live Authentication providers.     

The Result

By far the Windows Live ID for SharePoint fit the billet for this project. The robustness of the solution and the ease of configuration made this one a win in my book. It would have been much easier if I had tried this solution first, but using CKS WLA first helped me understand the solution much more, and made installation much easier the 10th time around.

Recommendations

Most guides recommend installation on the default zone, the approach I took was to extend my zone into the internet zone. This is how I would recommend doing it in other secnarios, mainly because it enables integrated authentication on your main url which in my case is much better for development. Each situation is different, but this approach worked best, and I would recommend it again.

Article Resources

SharePoint Conference 2009 Kicking Off
SharePoint Conference 2009 Kicking Off

As people slowly trickle in to Las Vegas for the SharePoint Conference this week, I wanted to point out a couple resources that will help you follow the storm of information after the calm. If you're not on twitter, now may be a good time to join and acquaint yourself with some of the SharePoint Twitterati. Or you can just follow the tweets and livebloging coverage from many of the blogs that will be following the conference.

Preparing for the SharePoint Conference:

  • Joel Oleson's 10 Step Program to Prepare for the Event [link]
  • Friendly Advice for Blogger Covering the Conference from Michael Gannotti [link] How True!

Informational Dashboards

  • SharePoint Development Wiki [link] As Information becomes available about development in the next version of SharePoint, the wiki pages will be updated, probably quite quickly. Perhaps subscribe to the RSS feed of Changes [RSS Feed]
  • End User SharePoint's Conference Dashboard for Twitter and LiveBlogging [link] Caution: 1 Twitter Stream, and 7 Live Blogging groups will ensure an overload of information.
  • Make Your Own Dashboard from End User SharePoint [link]

Other Links

  • My Schedule if You're Interested in Meeting Up In The Sessions [link]
  • #ShareEvents [link] Where SharePointers get together in a relaxed setting wether its dinner, drinks, or a show.
  • Where to Eat In Vegas A Local's Perspective [link]
  • Conference Website [link] Catch the Keynote Streamed Live!
  • Follow Mike Gannotti(The SharePoint Samurai) Through his Twitter Stream[link]

I'll be updating this post as information comes out, but now its time to travel. So I am boarding a plane here soon, but I look forward to meeting everyone in Las Vegas.

Dynamically Generating Technorati Tags for SharePoint Blog Posts
Dynamically Generating Technorati Tags for SharePoint Blog Posts

For those of you who post regularly, Technorati is a great way to categorize your posts on the Technorati site, it is also a great way for other blog search engines to figure out what your posts are about. Its also good for you to see what other content is generated the category that you're writing about. I personally forget to create the Technorati Tags in my blog posts, so I wanted a way to create the tags automatically with SharePoint. One thing that I've done differently with my blogs is enabled the Category lookup for selecting multiple items from the Category list. You don't need to do this for this script to work, but this modification was designed for tagging multiple categories with ease.

This is the first step is to enable multiple categories on your blog post list. Navigate to the list settings for the Posts list.

Make sure you select the "Allow Multiple Values" field underneath the Title selection.

Next we're going to want to open up the Post.aspx file in SharePoint Designer.

Navigate to "Data View" -> "Insert Data View "on the Toolbar. Click on the Posts List, and go to "Show Data"

From the Current Data Source View, select only the Category Field, and select the button that says "Insert Selected Field as" and select "Single item View"

Now we need to turn of Paging for the view:

Sometimes it automatically creates the PostID Paramter for you, but if it doesn't show up in the Parameters dialog, you will need to create a new parameter that is called ListID. Select New Paramter and choose "Query String" from the Parameter Source. The Query String Variable should be "ID" and you can put whatever default you like. I put the ID of the first blog post that I have.

Next you need to filter by that PostID which you just created. The Field name should be ID, with the "Equals" comparison and the value you should find at the bottom of the Value list which is "[PostID]". Hit OK to filter the view.

.

Now here comes the fun part, we need to modify the XSLT to strip some of the formatting that SharePoint uses for multiple categories and enable multiple tags for multiple categories. Luckily I've done all the hard work already, so you should just need to copy this script into your Code View. Find the <xsl:template name="dvt_1.body"> and the <xsl:template name="dvt_1.rowview">

tags in your body. Select both templates them and replace them with the following code in your source code view.

 

<xsl:template name="splitstr">

<xsl:param name="str" select="."/>

<xsl:choose>

<xsl:when test="contains($str,';')">

<xsl:text disable-output-escaping="yes">&lt;a href=&quot;http://technorati.com/tag/</xsl:text>

<xsl:call-template name="technorize">

<xsl:with-param name="tag" select="substring-before($str,';')"></xsl:with-param>

</xsl:call-template>

<xsl:text disable-output-escaping="yes">&quot; rel=&quot;tag&quot;&gt;</xsl:text>

<xsl:value-of select="substring-before($str,';')"></xsl:value-of>

<xsl:text disable-output-escaping="yes">&lt;/a&gt;</xsl:text>

<xsl:text> | </xsl:text>

<xsl:call-template name="splitstr">

<xsl:with-param name="str" select="substring-after($str,';')"></xsl:with-param>

</xsl:call-template>

</xsl:when>

<xsl:otherwise>

 

<xsl:text disable-output-escaping="yes">&lt;a href=&quot;http://technorati.com/tag/</xsl:text>

<xsl:call-template name="technorize">

<xsl:with-param name="tag" select="$str"></xsl:with-param>

</xsl:call-template>

<xsl:text disable-output-escaping="yes">&quot; rel=&quot;tag&quot;&gt;</xsl:text>

<xsl:value-of select="$str"></xsl:value-of>

<xsl:text disable-output-escaping="yes">&lt;/a&gt;</xsl:text>

 

</xsl:otherwise>

</xsl:choose>

</xsl:template>

<xsl:template name="technorize">

<xsl:param name="tag"></xsl:param>

<xsl:choose>

<xsl:when test="contains($tag,' ')">

<xsl:value-of select="substring-before($tag,' ')"></xsl:value-of>

<xsl:text>+</xsl:text>

<xsl:call-template name="technorize">

<xsl:with-param name="tag" select="substring-after($tag,' ')"></xsl:with-param>

</xsl:call-template>

 

</xsl:when>

<xsl:otherwise>

<xsl:value-of select="$tag"></xsl:value-of>

</xsl:otherwise>

</xsl:choose>

</xsl:template>

<xsl:template name="dvt_1.body">

<xsl:param name="Rows"/>

<xsl:param name="FirstRow" />

<xsl:param name="LastRow" />

<xsl:for-each select="$Rows">

<xsl:variable name="dvt_KeepItemsTogether" select="false()" />

<xsl:variable name="dvt_HideGroupDetail" select="false()" />

<xsl:if test="(position() &gt;= $FirstRow and position() &lt;= $LastRow) or $dvt_KeepItemsTogether">

<xsl:if test="not($dvt_HideGroupDetail)" ddwrt:cf_ignore="1">

<xsl:call-template name="dvt_1.rowview" />

</xsl:if>

</xsl:if>

</xsl:for-each>

 

</xsl:template>

<xsl:template name="dvt_1.rowview">

<tr>

<td>

<table border="0" cellspacing="0" width="100%">

<tr>

<td width="25%" class="ms-vb">Technorati Tags</td>

<td width="75%" class="ms-vb">

<xsl:call-template name="splitstr">

<xsl:with-param name="str" select="@PostCategory"></xsl:with-param>

</xsl:call-template>

</td>

</tr>

</table>

</td>

</tr>

</xsl:template>

 

You should end up with the following output:

SharePoint Saturday Copenhagen Welcome
SharePoint Saturday Copenhagen Welcome

 


Welcome to SharePoint Saturday Copenhagen

It is our pleasure to welcome you to SharePoint Saturday in Copenhagen on August 22nd. SharePoint Saturday Copenhagen is a free event for professionals who have an interest in SharePoint, and would like to learn more about the product. The speakers at the conference are a mix of Consultants, Professionals, and SharePoint MVPs who are valued for their community contribution. The purpose of this event is to engage the SharePoint community both locally and internationally. Topics will be presented by a variety of Danish and International SharePoint professionals, making this a truly international event.

A wide variety of topics will be covered that should appeal to any professional that works with SharePoint on a daily basis. This includes a specific Business Track that will enable decision makers to share ideas and experiences in a collaborative environment. Other tracks will include an IT Professional track whose subjects will include Administrative duties regarding SharePoint, or the Architecture track which covers Governance among other topics. The last track is a Developer track that is focused on a deep dive into SharePoint development. The developer track will culminate in a collaborative session where attendees can bring their issues or questions and have them answered by a panel of SharePoint Experts.

While networking is not the purpose of this event, beneficial relationships can be formed while interacting with colleagues at the event. Attendees will have a chance to meet some of the premiere companies producing SharePoint products. SharePoint Saturday is a sponsor funded event and would not be possible without the generosity of the sponsors. We encourage attendees to visit the sponsor booths and find out more about how SharePoint can be enhanced through third party products and services.

Lastly, I would like to focus on the community aspect of SharePoint Saturday. It started as a community event for a few SharePoint professionals in New York about a year ago. It has since grown into an event that has reached three continents in such a short time. Community events like SharePoint Saturday make working with SharePoint even more enjoyable. SharePoint is a collaborative platform, and SharePoint Saturday is hoping to expand that collaboration to the entire industry.

More information about SharePoint Saturday Copenhagen can be found at the website listed below, or via the email also listed below.


Take the Next Step, Register for SharePoint Saturday Copenhagen
http://spscph.eventbrite.com

 

SharePoint Saturday Copenhagen August 22nd, 2009 in Lygby, Denmark
Email: spscph@live.com Website: http://www.spscph.dk

Fixing a 404 Error on CKS:EBE Blog Post
Fixing a 404 Error on CKS:EBE Blog Post

I was troubleshooting a colleague's blog, the blog in question had a post that would throw a 404 error whenever browsed to the full name of the post. If you're familiar with Community Kit for SharePoint, the Enhanced Blog Edition, you'll know that when you open a url to a post that doesn't exist or has been deleted, it redirects you to the main page of the blog, which makes this error even more intriguing. CKS:EBE was recognizing the post, but somewhere along the line, was not able to display the post.

I tried changing the title of the blog post to no avail, as well as created other posts that I thought would end up throwing the 404 error. What I ended up doing is changing the "BlogTitleForUrl" field on the post. It went from the original title,

To this title with an update prepended to the post.

And this fixed the problem that you can see here.

Announcing SharePoint Saturday Copenhagen
Announcing SharePoint Saturday Copenhagen

It is my pleasure to announce the first European conference of the SharePoint Saturday Series. The event will happen on August 22nd in the Copenhagen, Denmark. Come join SharePoint professionals in a day of learning and interacting in all aspects of SharePoint. Come hear talks on SharePoint Administration, Development, Architecture and more. There will be presentations that will engage anyone works with SharePoint. SharePoint Saturday is free to all attendees and a not for profit event.

Visit the SharePoint Satuday Copenhagen site: http://www.sharepointsaturday.org/copenhagen

Interested at speaking at SharePoint Saturday in Copenhagen? Contact spscph@live.com to receive a speaker submission form.

If you would like to sponsor Sharepoint Saturday Copenhagen, please send an email to spscph@live.com and we will send you a sponsorship package.

Microsoft to Spin Off Software and Licensing Services
Microsoft to Spin Off Software and Licensing Services

I just received an email from Microsoft saying that they were transferring their Software And License Protection Service to their IP Venture which is called "InishTech". This is the email I received:

Dear Valued SLP Services Customer:

We are writing to share with you some important information about the Software Licensing and Protection Services (SLP Services) offered by Microsoft Corporation ("Microsoft").  Microsoft plans to transfer the SLP Services business to Inish Technology Ventures Limited ("InishTech"). InishTech is a new venture set up to focus on developing the global market for SLP Services. Microsoft is a shareholder in InishTech and will also continue as a customer of the SLP Services.

We are sharing this information with you ahead of time so that you receive this information from us first, not the press.  Since the official announcement of this transaction will not be until June 9, 2009, we ask that you keep this information confidential until that public launch date  InishTech will operate the SLP Services business and you will continue to be able to take advantage of the unique products and services that you are already enjoying.  Any agreement between you and Microsoft related to SLP Services will be assigned to InishTech as a result of this transaction.

We at Microsoft value our relationship with you, and we are confident that you will continue to receive great products, services, and support from InishTech. To ensure a smooth transition for all of our customers, we will continue to offer SLP Services support through our Customer Service and Support Division until September 24, 2009.  Microsoft will remain a partner and collaborator with InishTech, so rest assured we are vested in the success of this endeavor.  If you have any questions regarding this transition, please don't hesitate to contact me at slpsinfo@microsoft.com.   

Sincerely,

Bob Cadd

Global Account Executive

It seems that Microsoft will continue to support the current version with their customer support till the end of September, though beyond that InishTech will be responsible for the product. If you have not used the service, it is a great way to use license activation and obfuscation when paired with Dotfuscator. It seemed like a powerhouse when It came to knocking out some of their competitors, but in September of last year they stopped adding new customers to the Microsoft SLP System. Microsoft still has a stake in InishTech and will hopefully work with them to evolve this service. According to a MarketWatch article, Microsoft still has hopes for the product:

While Microsoft acquired the SLP business in 2007 to "take its core technology and develop it," Mansour said, the Redmond, Wash.-based company has since decided "to find a home where it can flourish." The SLP business quietly stopped accepting new orders late last year.
Source: MarketWatch

Here is hoping they can take a good product and make it even better.

A Perspective on Cloud Computing
A Perspective on Cloud Computing

I had the opportunity to attend a talk by David Chappel (http://www.davidchappell.com) of David Chappell & Associates on Friday about his perspective on Cloud Computing. The talk occurred Friday May 26th at the Microsoft Development Center in Copenhagen(http://www.mdcc.dk), otherwise known as the MDCC. At first I thought this was going to be a talk aimed at a small group of people, but a large group of probably 150 ended up attending. While the majority of the attendees were Microsoft employees, there were a large amount of people from outside of Microsoft.

He started off with a warm up generally covering the services that are out there such as Google's AppEnginge, Amazon's EC2 and Microsoft's Azure. After an overview he started getting deep into a comparison of the services that are out there, and here are some highlights that I thought were worth mentioning.

  • Google's AppEngine gives you 10 seconds to handle a request before spinning down the instance chosen to handle the request.
  • The two buckets these services fall into are now archaiac, Platform as a Service and Infrastructure as a Service are two restrictive and don't adequately categorize the services that are starting to mature.
  • The Azure Services are all individually built by separate teams at Microsoft… for now.
  • There is a difference between platform lock in and portability, mainly in custom development languages such as force.com.
  • SQL Services has a hard limit of 10gb, so scaling beyond that would take some finesse.
  • Table Storage in Azure is meant for very scalable applications
  • Queues in Azure are meant as an intermediary for data between web roles and worker roles
  • Each instance of a Web Role and Worker role is a "VM" within Azure

This is just a short example of the information that David was presenting, to find out more information about Cloud Computing from David Chappell, check out his blog where at lot of this information is featured. http://www.davidchappell.com/blog/index.php

 

Update: A slide deck very similar to the one that was presented at the MDCC can be found here: http://www.davidchappell.com/CloudPlatformsToday--APerspective--Chappell.pdf

Generating Test Tables with Azure Development Storage Fails
Generating Test Tables with Azure Development Storage Fails

I ran into the following error when trying to create the Test Storage Tables from Within Visual Studio 2008.

Unhandled Exception: System.Reflection.ReflectionTypeLoadException: Unable to load one or more of the requested types. Retrieve the LoaderExceptions property for more information.

         at System.Reflection.Module._GetTypesInternal(StackCrawlMark& stackMark)

         at System.Reflection.Assembly.GetTypes()

         at Microsoft.ServiceHosting.DevelopmentStorage.Table.DatabaseGenerator.GenerateDataBase(String server, String dbName, String[] assemblyPaths, Boolean forceCreate, ValidationHandler validationHandler)

         at Microsoft.ServiceHosting.DevelopmentStorage.Table.Program.Main(String[] args)

Took me forever to figure out what the problem was, but essentially the Azure tools try to generate entities from every dll referenced in your project, and it expects the dlls to be in either the GAC or the Bin folder of the WebRole. Now if you've integrated other projects into your Azure project, this might not be the case. The solution then is to run DevGenTables Manually using parameters similar to below.

"c:\Program Files\Windows Azure SDK\v1.0\bin\DevtableGen.exe" /forceCreate "/database:YourDatabaseNameHere" "C:\pathtoproject\Azure_WebRole\bin\Azure_WebRole.dll;C:\pathtoproject\Azure_WebRole\bin\StorageClient.dll;C:\pathtoproject\Azure\AzureWorker\bin\Debug\AzureWorker.dll"

 

You'll need to change the command to specify the dlls you are using in your project, but once that is done, you should see a message like this:

Windows(R) Azure(TM) Development Table database generation tool version 1.0.0.0 for Microsoft(R) .NET Framework 3.5
Copyright (c) Microsoft Corporation. All rights reserved.

DevTableGen : Generating database 'Azure'
DevTableGen : Generating table 'TableStorage' for type Azure_WebRole.TableStorageEntity'

Simple SharePoint URL Shortener
Simple SharePoint URL Shortener

Based on a request in Linked IN Discussion, I wanted to show how you can create a simple URL shortener using a SharePoint's Links list as well as a custom aspx page.

Step 1

To start off you should create a simple links list in SharePoint.

Once You've created the links list and populated it with the links that you want to share, open up SharePoint Designer.

Step2

Create a blank ASPX Page in SharePoint Designer, place the page at the root directory of your SharePoint site, and name it something appropriate.

You can see here that I've created a blank ASPX page and put it in the root directory as well as given it a name of "redir.aspx".

Step3

You will need to insert a single item view of the Links List you are using on the current page. Find the links list in the Data Source Library in SharePoint Designer.

Select the drop down triggered by the down arrow to the right of the list name, and select "Show Data".

Select only the URL field and Where it says "Insert Selected Fields as" click and select "Single Item View".

This should be your end result when you create the single item view. Go ahead and save your page so you don't lose your progress.

Step 4

Specify The details of the web part. Select the third option from the top where it says "Paging: 1 item(s) per set".

Change it so it only displays one item from the list, mainly because we don't want to send the client multiple places if the ID specified is incorrect or gets deleted.

Next select the third option from the bottom, "Parameters"


Select the "New Paramter" Button.


You'll want to specify a name such as "LinkID". You'll also want to specify the Paramter Source which is Query String, and the Query String Variable is "ID", and you have the options of specifying the default value if no ID is provided, I went ahead and provided the first item of my list.

Now that we have the parameter set up, we need to filter based on the parameter in the url. Select the first option in the properties named "Filter".


Create a filter rule that compares the ID Field to the LinkID parameter as outlined in the picture, and select OK.

Step 5

Now that we have the URL that we want, we need to tell the browser to redirect to the present URL. Find the section that looks like below:

<xsl:template name="dvt_1.rowview">

<tr>

<td>

<table border="0" cellspacing="0" width="100%">

<tr>

<td width="25%" class="ms-vb">

<b>URL:</b>

</td>

<td width="75%" class="ms-vb">

<a href="{substring-before(@URL, ', ')}">

<xsl:value-of select="substring-after(@URL, ', ')"/>

</a>

</td>

</tr>

<xsl:if test="$dvt_1_automode = '1'" ddwrt:cf_ignore="1">

<tr>

<td colspan="99" class="ms-vb">

<span ddwrt:amkeyfield="ID" ddwrt:amkeyvalue="ddwrt:EscapeDelims(string(@ID))" ddwrt:ammode="view"></span>

</td>

</tr>

</xsl:if>

</table>

</td>

</tr>

</xsl:template>

Replace it with the following code:

<xsl:template name="dvt_1.rowview">

<tr>

<td>

<xsl:text disable-output-escaping="yes">&lt;script type=&quot;text/javascript&quot; language=&quot;javascript&quot;>window.location=&quot;</xsl:text>

<xsl:value-of select="substring-before(@URL, ', ')"/>

<xsl:text disable-output-escaping="yes">&quot;;&lt;/script&gt;</xsl:text>

</td>

</tr>
</
xsl:template>

Step 6

Save and test it out. You can check out my version here:

http://www.sharepointevolved.com/redir.aspx?ID=2 should redirect to http://volitionservices.com/pages/sharepooch.aspx


 

1 - 10 Next