IT-Spirit Knowledge Base

To content | To menu | To search

Windows SharePoint Service 3.0

Entries feed - Comments feed

Saturday 30 January 2010

Configuring your web application with IIS 7.0 and Kerberos

This Article describes how to set Kerberos for your SharePoint Web Application, we consider that the kerberos is correctly confugured on the SQL side: SQL Service run with an Active Directory Account and the associated SPN is configured...

To create and configure web application with kerberos follow these steps:

  1. Create an Active Directory user account to run the IIS application pool.
  2. Set the SPN on this account.
  3. Trust Kerberos delegation on this account.
  4. Grant the rights "Local and Remote Activation" on the application pool account for the following DCOM object: IIS WARMREG ADMIN (for all web front end servers).
  5. Add the application pool account into the User Rights Assignments: "Act as a part of Operating System" (for all web front end servers).
  6. Create the web application with Host Header and select Kerberos for the authentication methods. Run the application pool with the application pool account created before.
  7. Edit the ApplicationHost.Config file on all web front end servers, locate this tag: <local path="name of yoursite">, next locate <windows security...> and modifify this tag as follow: <Windows security=.... UseAppPoolCredentials="TRUE" UseKernelMode="TRUE">
  8. Your are done.

Saturday 17 October 2009

Exporting/Importing a Site Collection with a cab file (STSADM)

It's usefull to export Site Collection when you need to migrate your site between SharePoint farm, or just to pass from one environment to another envirnment (i.e :dev to QA).

On the source server:

Connect one of your MOSS server and type the following command:

stsadm -o export -URL http://your_site_collection -filename youtpath\your_filename.cab -cabsize 1024 -versions 1

Versions: 1 to 4, 1 for Major Version (default) ; 2 the current version, either the last major or the last minor; 3 Last major and last minor version for files and list items and 4 All versions for files and list items.

If you need to import the security, you can the following switch: -includeusersecurity.

Note:If you want to increase import performance add the following switch: -nofilecompression.

Technical reference: http://technet.microsoft.com/en-us/library/cc262759.aspx

On the target server:

Copy all the cab files from the source server to the target server, create a new web application befor to import the site collection, and type the following command:

stsadm -o import -URL http://your-web_app -filename path_of_your_cab_file_or_folder(nofilecompression only) -updateversions 1 to 3

Updateversions:

  1. Add new versions to the current file (default)

  2. Overwrite the file and all of its versions (delete then insert)

  3. Ignore the file if it exists on the destination

Technical reference: http://technet.microsoft.com/en-us/library/cc261866.aspx

 

Scripting inside SharePoint with PowerShell - PART I Getting Started...

Download the following tools:

_PowerShell for windows 2003: http://www.microsoft.com/downloads/details.aspx?FamilyID=10EE29AF-7C3A-4057-8367-C9C1DAB6E2BF&displaylang=en

_Powergui: http://www.powergui.org/downloads.jspa , this is optional but is a very useful gui for scripting and navigating between methods and class...

_Powerpacks for SharePoint: http://www.powergui.org/kbcategory.jspa?categoryID=354

Install all products and when you are finished to install Powergui, add the SharePoint packages.

Note:Keep in mind, you can write yourscript only on the WSS server because the remote commands does not exists, all tools must be installed on one of WSS server who is member of your farm. 

The basics...

When you write a script for WSS, the first line begin by:

[System.Reflection.Assembly]::LoadWithPartialName("Microsoft.SharePoint") | Where-Object { $_.GetType().FullName -ne "System.Reflection.Assembly" } --->Recomended

OR

[System.Reflection.Assembly]::LoadWithPartialName("Microsoft.SharePoint") --->In some examples through Internet...

After loading into the GAC the DLL for SharePoint, you must to connect on the site where you need to script...

$SiteUrl = http://yoursite

#Creating your SP site object....

$Site = new-object Microsoft.SharePoint.SPSite($Site)

After that, you can display for example the site properties:

$Site.AllWebs | format-table | URL, LastItemModifiedDate, Created

Note: If you use the SharePoint PowerPack, you can browse through the $Site variable and you can see all propreties and methods.

 

 

 

Saturday 3 October 2009

How to upload new SharePoint Template?

First see if you have "Application Template" tab, when you create a new site, if not please follow this procedure:

Download the ApplicationTemplateCore file: http://www.microsoft.com/downloads/details.aspx?FamilyId=C1039E13-94DA-4D7D-8CAE-3B96FA5A4045&displaylang=en

Extract the WSP file and type the following command lines:

stsadm - o addsolution -filename <path>\ApplicationTemplateCore.wsp (result:Operation completed successfully.)

stsadm -o deploysolution -name Application TemplateCore.wsp -immediate -allowGacDeployment (result: Timer job successfully created.)

stsadmn -o copyappbincontent

 

If the Application Template Core is already deployed, please follow this procedure:

After you have extract the WSP file:

stsadm -o addsolution -filename <path>\Your_WSP_File

stsadm -o deploysolution -name Your_WSP_File -immediate -allowGacDeployment

After that check in the Solution management (Click the Operations tab, and then click Solution management under global configuration.) if your template is deployed (status is shown Globally Deployed), type the follwing command: iis reset.

You are done, one time you go to the Create Site, you will see under the Application Template tab, your template.