Tuesday, August 07, 2007

Case Study: La-Z-Boy Collaborates with ExCM and SharePoint


La-Z-Boy has numerous business partners, vendors and licensees, and sharing information with organizations outside the company had become a major issue. Because SharePoint out-of-the-box only allows administrators to create user accounts and assign security roles, the IT department was faced with making business decisions about what information to make accessible to outside parties in critical areas such as intellectual property.

ExCM enabled La-Z-Boy to shift the burden from IT to line-of-business employees with expertise in specific areas who know what is appropriate to share with external parties, and let them manage the account-creation process.

Read the complete case study.

Friday, August 03, 2007

Take Custom Action Upon SharePoint FBA User Login



Many of our customers have use cases where by they would like to take a specific custom action when an FBA (forms based authentication) user logs in to their SharePoint Extranet. Some examples may be to update a back-end CRM system, or redirect the user to a specific page. It is actually fairly simple to implement this logic. The Visual Studio project and source code for this article can be downloaded by clicking the download link at the bottom of this page.
First under the 12 hive, open the C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\TEMPLATE\LAYOUTS folder. Find the login.aspx file, and make a copy of it called CustomLogin.aspx. This will be our new user login page.
Next, open the web.config for your SharePoint application, find the <authentication/> element, and change it from:
    <authentication mode="Forms">
      <forms loginUrl="/_layouts/login.aspx" />
    </authentication>
to:
    <authentication mode="Forms">
      <forms loginUrl="/_layouts/CustomLogin.aspx" />
    </authentication>
Now, create a new Class Library project in Visual Studio, or alternatively download my sample project from the link below. Your project will need references to Microsoft.SharePoint.dll, Microsoft.SharePoint.ApplicationPages.dll, and System.Web.
Rename the automatically created Class1.cs to CustomLoginPage.cs. To save time and effort, the CustomLoginPage class will derive from Microsoft.SharePoint.ApplicationPages.LoginPage. Here's what the class should look like:
using System;
using System.Collections.Generic;
using System.Text;
using System.Web;
using System.Web.Security;

namespace SPSolutions.Custom
{
    public class CustomLoginPage : Microsoft.SharePoint.ApplicationPages.LoginPage    {
        protected override void OnLoad(EventArgs e)
        {
            base.OnLoad(e);
            this.login.LoggedIn += new EventHandler(OnLoggedIn);
        }

        // Fires after user has sucessfully logged in        void OnLoggedIn(object sender, EventArgs e)
        {
            // Get the user            MembershipUser user = Membership.GetUser(this.login.UserName);

            if (user != null)
            {
                // Do something interesting such as redirect or update CRM            }
        }
    }
}
As you can see, it is a simple matter of subscribing to the base page's login control's LoggedIn event, and then taking action when that event fires. Inside the event handler, you can instantiate a MembershipUser object for the newly logged in user, and then do something interesting.
It should also be noted that the login control has three other events which may be salient to your particular use case.
  • LoggingIn - Occurs when a user submits login information, but before authentication takes place.

  • Authenticate - Occurs when a user is authentication takes place.

  • LoggedIn - Occurs when a user logs in to the web site, and has been authenticated.

  • LoginError - Occurs when a login error is detected.
Next, open the CustomLogin.aspx page created in the first step, and modify its Assembly and Page declarations to point towards the new custom code behind assembly. If you're using my sample project, your declaration will look exactly like this:
<%@ Assembly Name="SPSolutions.Custom, Version=1.0.0.0, Culture=neutral, PublicKeyToken=e9db3057acd9c0f6"%> 
<%@ Page Language="C#" Inherits="SPSolutions.Custom.CustomLoginPage" MasterPageFile="~/_layouts/simple.master"%>
Finally, place the compiled assembly into the _app_bin folder of your SharePoint web application (e.g. C:\Inetpub\wwwroot\wss\VirtualDirectories\adventureworks.local.dev\_app_bin). Optionally, you could also place the assembly into the GAC.
Download SPSolutionsCustomLogin.zip
(Quick, painless registration is required for access to this download)

Wednesday, August 01, 2007

Windows IT Pro Editor's Best of 2007 Award Goes to Extranet Collaboration Manager


Windows IT Pro magazine has given our Extranet Collaboration Manager product their Editor's Best of 2007 Award in the SharePoint category. ExCM is awarded on page 30 of this month's (August) Industry Excellence Awards edition of the magazine, which is also available online here.

During this process, Windows IT Pro magazine considered products for 13 different categories, including one category for Microsoft SharePoint. ExCM took first place for the SharePoint category, followed by Quest Software's (NASDAQ: QSFT) SharePoint Administrator product in second place, and Commvault's (NASDAQ: CVLT) Galaxy Backup and Recovery product in third place.

The editors of Windows IT Pro interviewed with members of our esteemed customer DraftFCB during their review. DraftFCB specializes in integrated marketing and advertising with an emphasis on branding, interactive, emerging media, multimedia, and database technology. Headquartered in Chicago and New York, the agency's network spans 180 offices in 110 countries serving clients such as Hewlett-Packard, Verizon, Computer Associates, Kellogg, and the United States Postal Service. The agency is led by chairman and CEO Howard Draft and is a subsidiary of Interpublic, the world's third-largest advertising conglomerate. DraftFCB is an early adopter of ExCM, and is actively using our product in their SharePoint 2007 Extranet.

No other free or commercial product on the market today offers the complete set of features available from ExCM. ExCM is platform certified by Microsoft and Veritest, and is used by both large and small companies from around the globe to enable their SharePoint 2007 based Extranets.

A press release detailing the Editor's Best of 2007 Award for ExCM can be found on our software site here.