Archive

Posts Tagged ‘HowTo’

Installing SharePoint Foundation 2010 on Windows 7

July 20, 2010 8 comments

I know there’s a lot of posts describing how to install SharePoint Foundation 2010 (WSS4) on Windows 7 (see Microsoft’s installation procedure for Vista and Windows Server 2008 installations), but I just had to write my own short edition of the installation procedure available at MSDN.

Please note that Microsoft does not support this configuration for production environments. Windows 7 installations should only be used for development, testing and demo purposes!

Prerequisites

The following components and additions has to be installed on the computer running Windows 7 64-bit edition:

Installation procedure

Use the following procedure to install SharePoint Foundation:

  1. Make sure all prerequisites are met and no critical error is present in the event logs.
  2. Download SharePoint Foundation from Microsoft’s web site.
  3. Extract the web package to a temporary location using the /extract command line option.
  4. Edit the .\files\Setup\config.xml file according to the section below.
  5. Run the SharePoint Foundation setup, but do not run the configuration wizard.
  6. If you use a local SQL Server 2008, install KB970315.
  7. Run the SharePoint products and technologies configuration wizard.
  8. Install appropriate language packs.
  9. Configure SharePoint with the SharePoint Central Administration web application.

Editing the config.xml file

As described in step 4 in the installation procedure above, the config.xml file has to be edited to allow installation on Windows 7. Add the following line in the configuration section:
<Setting Id="AllowWindowsClientInstall" Value="True"/>

The entire config.xml file should look similar to this:

<Configuration>
  <Package Id="sts">
    <Setting Id="SETUPTYPE" Value="CLEAN_INSTALL" />
  </Package>
  <DATADIR Value="%CommonProgramFiles%\Microsoft Shared\Web Server Extensions\14\Data" />
  <Logging Type="verbose" Path="%temp%" Template="Microsoft Windows SharePoint Services 4.0 Setup *.log" />
  <PIDKEY Value="RBWQH-7PFXQ-D6RX2-HVK8Y-HP7F7" />
  <Setting Id="UsingUIInstallMode" Value="1" />
  <Setting Id="SETUP_REBOOT" Value="Never" />
  <Setting Id="AllowWindowsClientInstall" Value="True"/>
</Configuration>

IIS Features and Components

The follow screen shots shows required IIS components as described in the prerequisites section:

N’Joy!

Advertisements

Using LiveID with SharePoint

Managing users and user profiles on a public or community site running SharePoint is often a pain in the ass. Luckily some creative developers have created an authentication provider for SharePoint which authenticates users with Microsoft LiveID. I’ve tried different solutions, but the extended version of CKS:LiveID developed by Wictor Wilén seems to be the best to use and easiest to install and configure.

How to get started? Well, in short terms:

  • Download the Live Authentication Provider from Codeplex.
  • Register a LiveID authentication service at Microsoft Azure.
  • Install and configure the LiveID authentication provider according to the documentation provided with the solution file.
  • Add users and user permissions to your site, and…
  • Off you go!

    Please note that the authentication provider requires outbound http and https traffic (web services). If you use a proxy, please make sure you add the appropriate proxy settings in the web.config file!

    See also Wictor’s blog post on the solution.

    The DNN-approach

    Another approach is to use the LiveID integration provided with the DotNetNuke (DNN) framework. With some additional modules, it’s possible to use DNN as an authentication and user management front-end to SharePoint. This makes a great authentication provider and self-service user management solutions, especially since the modules for DNN is free and highly customizable.

    N’Joy!

    HowTo remove unused features from a site template file

    November 16, 2009 Leave a comment

    When you create a site template (.stp) or an export via stsadm.exe you will end up with a cabinet formatted archive with all the data and some XML files. One of these XML files, the Requirements.xml, contains references to all requirements the site template has. Unfortunately, SharePoint adds references to core features even if they’re not required. Typically, when you export a site from a SharePoint Enterprise server, all the enterprise features are included as requirements even if the feature set is turned off and not used.

    To fix this you will need to modify the Requirements.xml file inside the cabinet archive. This is how I do it:

    1. Rename the export or template file to .cab
    2. Extract all content to a separate directory
    3. Modify the Requirements.xml by removing all lines referring to features which is not required (be careful!)
    4. Create a new .cab file with all the same content and the modified Requirements.xml (I use Microsoft’s cabarc.exe)
    5. Rename the new cabinet file with the proper file extension
    6. Import the file according to the SharePoint environment

    Please note that any errors in the XML file or removal of actual required features may result in a corrupt cabinet file and/or a corrupted site, so BE CAREFUL!

    N’Joy!

    Sharepoint version number in Office 2003 docs

    Since the automatic propagation of Sharepoint version number requires Office 2007 files (.docx), it’s often required to enable this functionallity manually.
     
    I came over a blog entry which describes how to do this and implement it as a Sharepoint feature. See the following blog entry for details:
     
    If you don’t have the possibility to deploy new solutions, you might use VBA as well. See the following article for information on how to do this:
     
    However, since the macro and script security in Office often requires the persmission to run unsecured code, I recommend the feature approach.
     
    If you only use Office 2007 document formats, simply add the "_Version" document property to your document and all is done.

    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!

    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!

    Configuring a web application for proxy

    October 2, 2008 Leave a comment

    For some mysterious reason, the web proxy auto detect setting in the web.config file for a web application does not work that well. Thankfully it’s possible to specify proxy settings manually in the web.config file by adding the following entries in the <system.net> section:

    <defaultProxy>
       <proxy proxyaddress="http://%5BServerIP%5D:%5BPort%5D&quot; bypassonlocal="true" />
       <bypasslist>
         <add address="myOwnDomain.com" />
       </bypasslist>
    </defaultProxy>

    To revert to the default auto detect setting, replace the section above with the following:

    <defaultProxy>
        <proxy autoDetect="true" />
    </defaultProxy>

    N’Joy!

    %d bloggers like this: