Archive
Installing SharePoint Foundation 2010 on Windows 7
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:
- WCF hotfix (KB971831) for Windows 7
- ADO.NET Data Service Update for .NET Framework 3.5 SP1
- Microsoft Filterpack 2.0 (a part of the SharePoint 2010 Foundation distribution)
- Microsoft Sync Framework
- SQL Server Native Client
- Windows Identity Foundation (KB974405)
- Windows 7 Internet Information Server with components shown in a section bellow.
Installation procedure
Use the following procedure to install SharePoint Foundation:
- Make sure all prerequisites are met and no critical error is present in the event logs.
- Download SharePoint Foundation from Microsoft’s web site.
- Extract the web package to a temporary location using the /extract command line option.
- Edit the .\files\Setup\config.xml file according to the section below.
- Run the SharePoint Foundation setup, but do not run the configuration wizard.
- If you use a local SQL Server 2008, install KB970315.
- Run the SharePoint products and technologies configuration wizard.
- Install appropriate language packs.
- 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!
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:
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
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:
- Rename the export or template file to .cab
- Extract all content to a separate directory
- Modify the Requirements.xml by removing all lines referring to features which is not required (be careful!)
- Create a new .cab file with all the same content and the modified Requirements.xml (I use Microsoft’s cabarc.exe)
- Rename the new cabinet file with the proper file extension
- 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
Kerberos authentication and NLB clusters
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
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
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" 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!
Ekskludering av virtual directory
I enkelte tilfeller kan det være ønskelig å ekskludere et virtual directory fra en IIS web site som kjører .NET applikasjoner. F.eks. kan det være en eldre ASP applikasjon som ønskes kjørt innenfor samme namespace som en .NET applikasjon.
For å få dette til må man få IIS til ikke å håndtere den virtuelle applikasjonen som en .NET applikasjon, og den enkleste måten å gjøre dette på er å ekskludere den fra web.config filen på applikasjonen og fjerne .NET extensions på den virtuelle mappen.
Måten å ekskludere en mappe fra en .NET applikasjon er å legge inn følgende linje i web.config under <configuration> seksjonen:
<location path="[path]" allowOverride="true"/>
For å fjerne .NET extensions på den virtuelle mappen, gjør følgende:
- I IIS Manager, høyreklikk på den virtuelle mappen og velg properties.
- Under Virtual Directory tabben klikk på Configuration knappen.
- Fjern alle .dll referanser fra listen Wildcard application maps.
Etter at dette er gjort må IIS restartes (iisreset /noforce).