Author Archives: Christian

List all Web features with Object Model

Just a little C# sniplet which lists all feature IDs of a SharePoint web:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.SharePoint.Administration;
using Microsoft.SharePoint;
namespace SiteCollections
{
    class Program
    {
        static void Main(string[] args)
        {
            SPFarm farm = SPFarm.Local;
            SPWebService service = farm.Services.GetValue<SPWebService>(“”);
            foreach (SPWebApplication webapp in service.WebApplications)
            {
                Console.WriteLine(“Web Application: ” + webapp.Name);
                foreach (SPSite site in webapp.Sites)
                {
                    Console.WriteLine(” Site Collection URL: ” + site.Url);
                    foreach (SPWeb web in site.AllWebs)
                    {
                        Console.WriteLine(“  Web URL: ” + web.Url);
                        foreach (SPFeature feature in web.Features)
                        {
                            Console.WriteLine(“    Feature ID: ” + feature.DefinitionId);
                        }
                    }
                }
                Console.WriteLine(“n”);
            }
        }
    }
}

Data Protection Manager 2007 (DPM), Exchange 2007 and LCR

Okay, DPM 2007 installed fine on Windows Server 2008 (after performing some IIS modifications, see previous post). Installing the backup agents on the servers I wanted to backup went fine, too.

But when I wanted to backup my Exchange 2007 storage group I got this screen:
DPM-no-SG
Do you see the storage group? Neither did I.

What happened?

Very simple, when using Local Continuous Replication on Exchange 2007, you have to set a registry key:
Under HKLMSoftwareMicrosoftExchangeReplayParameters create a DWORD named EnableVssWriter and assign the value 0. It is described here. After restarting the Microsoft Exchange Replication Service the storage group appeared in DPM:
DPM-SG

I could re-enable LCR and then both worked fine, DPM and LCR.

Data Protection Manager on Windows Server 2008

Recently, I wanted to test Microsoft Data Protection Manager 2007 on Windows Server 2008. My goal is to test backup and restore of MOSS and Exchange 2007.

When installing on Windows Server 2008, you can follow this instructions.

However, I experienced a problem during the population of the reports. The failure message did not say too much (“Report configuration failed. Verify that SQL Server Reporting Services is installed properly and that it is running.”), so I clicked on the link to see the logfile. Surprise: the complete HTTP response delivered from IIS was in the logfile as HTML text. So I copied the text to a new HTML file:
error

Okay, “Integrated managed pipeline mode”. Let’s take a look at IIS:
IIS

The “Default Web Site” is used for the Reporting Services and it uses the “DefaultAppPool”.

After changing the Managed Pipeline Mode to “Classic”, the DPM installation finished successfully.

Microsoft Office Sharepoint Server 2007 (MOSS) Cumulative Update for August 2008 released, Build 6327

As of August, 26th 2008, the new August post-SP1 Update was released by Microsoft. It fixes a lot of issues and should be obtained from Microsoft Support Services.

The build after installing this hotfix is 12.0000.6327.5000.

The KB article mentioned here http://support.microsoft.com/kb/953878/en-us is not public yet, but it should be very soon.

For more details, see this article: http://support.microsoft.com/kb/953878/en-us

Microsoft Office Sharepoint Server 2007 (MOSS) – Advanced Search – Turn on “contains” again

As you may have noticed the "contains" and "does not contain" search options were removed with build 6317.
contains-01

The reason for this is, that this options can heavily decrease performance. But you can simply turn the options on again:

1. Goto to the Advanced Search site and edit it
contains-02

2. Modify the "Advanced Search Box" Webpart
contains-03

3. Expand Properties and edit Properties
contains-04 

4. Find "Option Name=AllowOpContains" and change the Value to "True"
<Name=AllowOpContains" Value="False"> –> Contains option turned off
<Name=AllowOpContains" Value="True"> –> Contains option turned on
contains-05 
If you cannot find the entry, create it.

5. Click OK and publish the page.

Have fun!

Duplicate SPNs and Windows Server 2008

Recently I got a comment how to locate duplicate SPNs when using Windows Server 2008.

Luckily, this is very easy, because the SETSPN command from Windows Server 2008 has this functionality builtin:
http://technet2.microsoft.com/windowsserver2008/en/library/39b7428a-2b45-4640-9bd7-46833007d38d1033.mspx?mfr=true

Remove the duplicate service prinicipal name

Each service principal name (SPN) must be unique. Without unique principal names, the Kerberos client is not able to ensure that the server it is communicating with is the correct one. You must identify the duplicate SPN, and then remove it.

To perform these procedures, you must be a member of the Domain Admins group, or you must have been delegated the appropriate authority.

To identify the duplicate SPN:

1. Log on to the computer referenced in the event log message. If this computer is not running Windows Server 2008, you must download and install the Windows Server 2003 Resource Kit, which includes setspn.exe.
2. Click Start, point to All Programs, click Accessories, right-click Command Prompt, and then click Run as administrator.
3. If the User Account Control dialog box appears, confirm that the action it displays is what you want, and then click Continue.
4. Type setspn -X.
5. The output of this command will show the duplicate SPNs.
6. Use the following procedure to remove one of the duplicate SPNs.

Remove an SPN

To remove an SPN:

1. Click Start, point to All Programs, click Accessories, right-click Command Prompt, and then click Run as administrator.
2. If the User Account Control dialog box appears, confirm that the action it displays is what you want, and then click Continue.
3. Type setspn -D<SPN> <computer_name>, where SPN is the name of the duplicate SPN and computer_name is the name of the computer that is assigned the duplicate SPN.

Windows Mediaplayer on Vista does not start?

I use a Thinkpad T61p with Windows Vista Ultimate x64.
Today the Windows Media Player did not start, a reboot did not make the clue. When I started the Windows Media Center and went to Recorded TV, I just could see the rotating circle and no more.

Here is what helped me out:
Delete all files in %LOCALAPPDATA%MicrosoftMedia Player and restart Windows Media Player.

http://support.microsoft.com/kb/925718/en-us