Archive

Archive for November, 2008

Kerberos authentication and NLB clusters

November 24, 2008 Leave a comment

When you use Kerberos as the authentication mechanism with Sharepoint and want to configure NLB for load balanced front-end servers you will have to configure an extra SPN for the NLB cluster name. This is caused by the fact that Kerberos uses the hostname as a part of the Kerberos Ticket request, even if the URL used is something different. This is described in detail in Microsoft KB929650.

With the following scenario, set the SPN names accordingly:
NLB server A: SPServerA.MyDomain.com
NLB server B: SPServerB.MyDomain.com
NLB Cluster Name: SPNLB.MyDomain.com
Web Application Account: MyDomain\SharepointApp

SPN commands for NLB with Kerberos for the described scenario:
setspn.exe /A HTTP://SPServerA.MyDomain.com MyDomain\SharepointApp
setspn.exe /A HTTP://SPServerB.MyDomain.com MyDomain\SharepointApp
setspn.exe /A HTTP://SPNLB.MyDomain.com MyDomain\SharepointApp

Please note that all computer and application accounts must be enabled as trusted for delegation!

N’Joy!

Advertisements

CKS:EBE 2.5 Review

November 23, 2008 Leave a comment

I’ve been using the Community Kit for Sharepoint Enhanced Blog Edition 2.5 Beta for a couple of weeks and is quite impressed. Even if there’s several features that does not work, and the solution is somewhat unstable, I think this is the best addition to Sharepoint regardless of FreeProg or commercial wares.

I’ve posted some requests and questions on the authors web site (The Kid), which I hope will be implemented in the next final release, and I certainly hope the final release of 2.5 is somewhat close by.

I will recommend this solution to anyone with a public WSS3 site which they want to make a bit more user friendly and appealing to the user.

My rating: 10 of 10!

N’Joy!

iFrame page template for MOSS

November 17, 2008 Leave a comment

As you all know, the web page viewer web part included in Sharepoint does not support dynamic sizing of the iFrame it creates. Because of this, I found the need for a page template which users might use to create a Sharepoint page with external content. The following code is the entire page template, which might be used as is by anyone it might suit.

Please not that the javascript variable FooterHeight has to be set according to the whitespace you would like at the bottom the page. The height of 30 pixels is based on the footer height of the default collaboration master included in Sharepoint 2007.

<%@ Page language="C#" Inherits="Microsoft.SharePoint.Publishing.PublishingLayoutPage,Microsoft.SharePoint.Publishing,Version=12.0.0.0,Culture=neutral,PublicKeyToken=71e9bce111e9429c" meta:progid="SharePoint.WebPartPage.Document" %>
<%@ Register Tagprefix="SharePointWebControls" Namespace="Microsoft.SharePoint.WebControls" Assembly="Microsoft.SharePoint, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %>
<%@ Register Tagprefix="WebPartPages" Namespace="Microsoft.SharePoint.WebPartPages" Assembly="Microsoft.SharePoint, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %> 
<%@ Register Tagprefix="PublishingWebControls" Namespace="Microsoft.SharePoint.Publishing.WebControls" Assembly="Microsoft.SharePoint.Publishing, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %> 
<%@ Register Tagprefix="PublishingNavigation" Namespace="Microsoft.SharePoint.Publishing.Navigation" Assembly="Microsoft.SharePoint.Publishing, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %>   <asp:Content ContentPlaceholderID="PlaceHolderPageTitle" runat="server">
   <SharePointWebControls:FieldValue id="PageTitle" FieldName="Title" runat="server"/>
</asp:Content>
<asp:Content ContentPlaceholderID="PlaceHolderPageTitleInTitleArea" runat="server">
   <SharePointWebControls:TextField runat="server" id="TitleField" FieldName="Title"/>
</asp:Content>
<asp:Content contentplaceholderid="PlaceHolderAdditionalPageHead" runat="server">
   <PublishingWebControls:editmodepanel runat="server" id="editmodestyles">
     <!-- Styles for edit mode only-->
     <SharePointWebControls:CssRegistration name="<% $SPUrl:~sitecollection/Style Library/~language/Core Styles/zz2_editMode.css %>" runat="server"/>
   </PublishingWebControls:editmodepanel>
   <SharePointWebControls:CssRegistration name="<% $SPUrl:~sitecollection/Style Library/~language/Core Styles/rca.css %>" runat="server"/>
   <SharePointWebControls:FieldValue id="PageStylesField" FieldName="HeaderStyleDefinitions" runat="server"/>
</asp:Content>
<asp:Content ContentPlaceHolderId="PlaceHolderTitleBreadcrumb" runat="server">
   <div class="breadcrumb">
     <asp:SiteMapPath ID="siteMapPath" Runat="server" SiteMapProvider="CurrentNavSiteMapProviderNoEncode" RenderCurrentNodeAsLink="false" SkipLinkText="" CurrentNodeStyle-CssClass="breadcrumbCurrent" NodeStyle-CssClass="ms-sitemapdirectional"/>
   </div>
</asp:Content>
<asp:Content ContentPlaceholderID="PlaceHolderMain" runat="server">
   <SharePointWebControls:CssRegistration name="<% $SPUrl:~sitecollection/Style Library/~language/Core Styles/pageLayouts.css %>" runat="server"/>
   <table id="MSO_ContentTable" cellpadding="0" cellspacing="0" border="0" width="100%">
     <tr>
        <td>
           <div class="pageContent">
             <PublishingWebControls:RichHtmlField id="content" FieldName="PublishingPageContent" runat="server"/>
           </div>
        </td>
     </tr>
     <tr>
        <td style="padding-top: 5px;">
     <WebPartPages:WebPartZone runat="server" FrameType="None" AllowPersonalization="false" Title="<%$Resources:sps,LayoutPageZone_BottomZone%>" ID="MiddleLeftZone" Orientation="Vertical" QuickAdd-ShowListsAndLibraries="false" allowlayoutchange="false"><ZoneTemplate></ZoneTemplate></WebPartPages:WebPartZone> <!-- _locID@Title="L_MiddleLeftZone_Title" -->
        </td>
     </tr>
   </table>
   <PublishingWebControls:editmodepanel runat="server" id="editmodepanel1">
     <!-- Add field controls here to bind custom metadata viewable and editable in edit mode only.-->
     <table cellpadding="10" cellspacing="0" align="center" class="editModePanel">
        <tr>
           <td>
             <PublishingWebControls:RichImageField id="ContentQueryImage" FieldName="PublishingRollupImage" AllowHyperLinks="false" runat="server"/>
           </td>
           <td width="200">
             <asp:label text="<%$Resources:cms,Article_rollup_image_text%>" runat="server" />
           </td>
        </tr>
     </table>
   </PublishingWebControls:editmodepanel>
<script language="JavaScript">
  <!--
    function resizeFrame() {
      objFrame = document.getElementsByTagName("iframe").item(0);
      windowHeight = document.body.offsetHeight;
      headerHeight = absoluteTop(objFrame);
      iframeHeight = windowHeight - (headerHeight + footerHeight);
      if (iframeHeight >=0) { objFrame.style.height = iframeHeight};
      objFrame.style.border = "1px solid gray";
      objFrame.style.margin = "0px";
    }       function absoluteTop(objNode) {
      var currentNode=objNode;
      var sumTop=0;
      while(currentNode.tagName!="BODY"){
        sumTop+=currentNode.offsetTop;
        currentNode=currentNode.offsetParent;
      }
    return sumTop;
    }       function getFooterHeight() {
      objPlaceHolder = document.getElementById("ctl00_MSO_ContentDiv");
      footH = document.body.offsetHeight - (absoluteTop(objPlaceHolder) + objPlaceHolder.offsetHeight);
      return footH;
    }       var footerHeight = 30;
    window.attachEvent ("onresize", resizeFrame);
    window.attachEvent ("onload", resizeFrame);
  //  resizeFrame();
  //  footerHeight = getFooterHeight();
  // -->
</script>
</asp:Content>  

N’Joy!

Resizing an iFrame to it’s parent

November 17, 2008 Leave a comment

In some cases it’s not possible to use the style tags width and height to define the size of an object on a web page. This is typically the case when an inline frame is placed within a placeholder such as a <div> or a <td>. My approach to resolve this is to include a javascript which resizes the iframe based on it’s parents width and height.

The script is based on a Sharepoint 2007 collaboration page template and has a static reference to the page footer. If this should be used elsewhere, please modify the static object references in the code.

function resizeFrame() {
   objFrame = document.getElementsByTagName("iframe").item(0);
   windowHeight = document.body.offsetHeight;
   headerHeight = absoluteTop(objFrame);
   iframeHeight = windowHeight - (headerHeight + footerHeight);
   if (iframeHeight >=0) { objFrame.style.height = iframeHeight};
   objFrame.style.border = "1px solid gray";
   objFrame.style.margin = "0px";
}

function absoluteTop(objNode) {
   var currentNode=objNode;
   var sumTop=0;
   while(currentNode.tagName!="BODY"){
      sumTop+=currentNode.offsetTop;
      currentNode=currentNode.offsetParent;
   }
   return sumTop;
}   function getFooterHeight() {
   objPlaceHolder = document.getElementById("ctl00_MSO_ContentDiv");
   footH = document.body.offsetHeight - (absoluteTop(objPlaceHolder) + objPlaceHolder.offsetHeight);
   return footH;
}

var footerHeight = 30;
window.attachEvent ("onresize", resizeFrame);
window.attachEvent ("onload", resizeFrame);

N’Joy!

SaaS in real life

November 16, 2008 Leave a comment

First of all, I think SaaS (Software as a Service) is a great idea, but if the user experience is to be comparable to a client installed application it has to be at least as quick and at least as flexible as an application. I work quite a lot with collaborative solutions such as Sharepoint, and if I should suggest to use an online text editor or a spreadsheet, it would need to have the same integration and collaborative features as Office 2007. However, I have some difficulties imaging this feature rich integration from a SaaS, unless Microsoft joins the game.

%d bloggers like this: