Feature differences between SharePoint 2007 Enterprise and Standard for a Publishing Portal

May 4th, 2010 2 comments

I recently had to deploy a site template that was built using SharePoint Enterprise Edition 2007 on an instance of SharePoint Standard Edition 2007.

Obviously given that some features were not available in the Standard Edition I received the ‘The template you have chosen is invalid or cannot be found’. Unlike a MOSS to WSS conversion the problem here is that the features do exist on the server but are simply not available for the standard edition.

I basically resorted to manually comparing the differences between a site template created in the Standard edition vs one created in the Enterprise edition.

Here’s the list if anyone ever needs this.

Remove these features from a template created in the Enterprise edition if you want to deploy it on a Standard edition. Obviously you need to test to ensure that your template is not actually using any of the Enterprise features.

<Feature ID="065c78be-5231-477e-a972-14177cc5b3c7" />
<Feature ID="0806d127-06e6-447a-980e-2e90b03101b8" />
<Feature ID="2510d73f-7109-4ccc-8a1c-314894deeb3a" />
<Feature ID="e8734bb6-be8e-48a1-b036-5a40ff0b8a81" />
<Feature ID="00bfea71-dbd7-4f72-b8cb-da7ac0440130" />

Categories: SharePoint Tags: ,

SQL Server 2008 Service Weirdness

May 1st, 2010 1 comment

Two weird things I learnt about SQL Server while building the SharePoint 2010 Service Manager.

1. SQL Server Agent service for SQL Express is bogus

Whenever Service Manager started, the SQL Server Agent service for the SharePoint (SQL Express) instance  would immediately stop with either of the following errors logged in the Windows Event Log.

  • The service cannot be started, either because it is disabled or because it has no enabled devices associated with it. [0x80070422]
  • SQLServerAgent could not be started (reason: Error creating a new session).

The self explanatory title of the bug filed on Connect says it all ‘SQL Express installs SQL Agent Service for no apparent reason‘. Apparently the team cutting down features for the Express edition forgot to tell the Agent team that they weren’t needed in Express.

2. SQL Server VSS Writer Service : Startup Type get’s reset to ‘Manual’

The Service Manager has a feature that let’s you set the startup type of all the SharePoint and related services to Manual. This way they wouldn’t automatically startup when Windows starts hence leaving the workstation to boot faster.

The Service Manager only shows the ‘Stop Automatic Startup’ button if the Startup Type of any of SharePoint services are set to Automatic. While testing the feature I released that after sometime the button automatically showed up even after I had set all the services to start manually.

That was when I figured out that even if I manually change the service (through Control Panel) to start manually, something would change the startup to Automatic after a while. I haven’t figured out what changes it’s startup type to automatic but I’m guessing that’s by design. My workaround for the Service Manager was to ignore the startup type of the VSS Writer service when checking if all the services were set to manual.

Categories: Service Manager Tags:

SharePoint 2010 Service Manager

April 29th, 2010 4 comments

With the final release of SharePoint 2010, I finally had time to brush-up and release the Service Manager that I wrote sometime back when the 2010 betas was released.

This utility is basically akin to the SQL Server Service Manager of yore.

If you have SharePoint 2010 installed on your local Windows 7 workstation then you will definitely come across instances where your workstation suddenly freezes up and everything starts moving in slow motion. The most likely culprit is usually one of the SharePoint services. At other times the SharePoint services simply eat away at your RAM.

That’s where the SharePoint 2010 Service Manager comes into play. It lets you start and stop all the SharePoint Services running on your workstation with a single-click.

This release handles both the full version of SQL Server as well as SQL Express Edition (the SharePoint instance). There is also an option to permanently disable the SharePoint services from starting up when Windows starts up, hopefully leading to faster boot times.

Here are a couple of screenshots. Get the setup file from CodePlex at http://sharepointserviceman.codeplex.com/.

I’d like to thank my colleagues at UniqueWorld including Neil, Rehman and Dougie who tested the first version and gave valuable feedback.

Please do report any issues you find to merill at merill.net

Visual Studio 2010 Installation Issue – Setup Failed with HRESULT -2147467259

April 27th, 2010 No comments

If you Visual Studio 2010 setup keeps failing when it tries to install the Visual C++ runtime, here’s a quick fix for you.

Try installing one of the Visual Studio 2010 Express Editions (I did the Web Edition: http://www.microsoft.com/web/downloads/platform.aspx) and then run the VS2010 installation.

I think it has something to do with mounting the ISO as a drive.

Categories: Tips Tags: ,

Icons & Illustrations for SharePoint Architecture Diagrams

March 26th, 2010 No comments

A picture is worth a thousand words.

Like me if you spend a lot of time writing up functional specs and architecture diagrams and are looking for ways to convey your ideas through illustrations, here are a few pointers.

Search the Hive

The 12 (now 14) hive has a wealth of icons. The images in the png formats are the slightly larger, higher resolution ones. You can find them at 14\TEMPLATE\IMAGES. Here are a few samples.

14 Hive Icons

 

Visio 2010 SharePoint Workflows

These are new ones, the icons in this stencil are vector based and can be resized without blurring.

SharePoint Workflow Actions

 

Google / Bing Image Search

Set the filter type to icon and clipart and you do come across some good gems. Remember to check the copyright on the images before using them.

 

SmartArt in PowerPoint 2007 & 2010

The SmartArts are a powerful tool to illustrate your ideas and need to be used wisely.

SmartArt

Play around with the various styles to get the look you want. Here’s one I built for a functional spec recently.

SmartArt Picture

 

Here’s a diagram I built today to document a web part. The icons came from Google, the Hive and good old Visio.

Filter Web Part

 

Snipping Tool

My favourite tool to get screen grabs, and save them to files if necessary, is the Snipping tool. This has been built into Windows since XP SP2 and is a really handy utility. To get to it just type snip in the Start menu and you should see the Snipping Tool.

One of the first things I do on a new installation is to disable the Red outline from the Option menu. FYI: All of the images above were snipped and saved to disk using the Snipping Tool before being inserted into Live Writer.

SnippingTool

Categories: Tips Tags: ,

.NET 4 Free Beta Exam Vouchers

March 24th, 2010 No comments

Looks like I somehow missed this. Free vouchers for the .NET 4 (Visual Studio 2010 Beta Exams) are available online in the Born to Learn blog.

I couldn’t register for the 71-515 (TS: Web Application Development with .NET 4) exam as it was booked up but there were seats still available for the other two exams that I registered for today.

You need to take the exams before 30-Apr, so you have almost a month to get prepared. You can also make use for the pilot beta preparation resources that other candidates are sharing, see the ‘Preparing for the Visual Studion 2010 beta exams’ post by Krista.

Categories: Certification Tags: , ,

SharePoint Client on Windows 7 Phone

March 19th, 2010 3 comments

Yesterday I was excited when I could download the Win 7 dev kit, but that turned to disappointment when I realised that I could only run the application that I deployed and not try out the other stuff on the phone.

Today, thanks to Dan Ardelean I was able to unlock the Windows 7 Phone emulator. So here I was poking around only to be pleasantly surprised to see the SharePoint client built in to the phone.

Here are the first screenshots you’ll see of the Win7Phone SharePoint client.

SharePointWorkspace

MySiteLinks

SharePoint Client

Get Safe File Name

March 15th, 2010 3 comments

Here’s a quick utility that might come in handy. More than once I’ve seen code where the invalid chars were hard coded. The Path.GetInvalidFilenameChars has been in the .NET Framework since 2.0.

The thing is you would expect something like this to be in the framework itself.

        /// <summary>
        /// Removes invalid characters from the string that is passed in.
        /// </summary>
        /// <param name="name">The name of the file.</param>
        /// <returns>The safe name with invalid chars removed.</returns>
        public static string GetSafeFileName(string name)
        {
            var safeName = new StringBuilder();
            foreach (var c in name)
            {
                if ((from p in Path.GetInvalidFileNameChars() where p == c select p).Count() == 0)
                {
                    safeName.Append(c);
                }
            }
            return safeName.ToString();
        }

Chris Martin posted an even tighter version of this code in the comments below. Thanks Chris.

var invalid = Path.GetInvalidFileNameChars();

return new string((from p in name
        where !invalid.Contains(p) select p).ToArray());
Categories: Tips Tags:

SharpSvn: A Primer

March 12th, 2010 7 comments

The SharpSvn library basically gives you a .NET interface to all the operations that you would normally perform through a tool like TortoiseSVN.

I found myself needing this exact library while writing a tool that changes files that have been checked out from SVN.

The problem with manipulating files that are under SVN is that you need to be careful about renaming files (and sometimes even deleting). If you don’t do it through the SVN api then you will end up with duplicates files/folders in SVN since SVN thinks that it’s a new file.

To solve this I finally got a chance to crack open the SharpSVN library which is used by my favourite AnkhSVN.

1. Download the latest library from http://sharpsvn.open.collab.net/. You have to pick between either 1.5 or 1.6. I went with 1.6 and didn’t run into any issues. I think this is based on the version of the SVN server that your connecting to.

2. In your Visual Studio project add a reference to the following assemblies.
- SharpSvn.dll
- SharpSvn.UI.dll (Only needed if you need the UI to prompt for login)

3. If like me your building on a 64 bit OS and you want your app to run on a 32 bit OS, make sure the project that references the SharpSvn.dll is set to Build for the x86 Platform. (Build –> Configuration Manager – Solution Platform)

4. Write your code using the SvnClient object. Here are some samples from the SharpSvn Wiki and some that I wrote.

CheckOut

public void CheckOut()
{
  using (SvnClient client = new SvnClient())
  {
     client.CheckOut(
       new Uri("http://svn.collab.net/repos/svn/trunk/contrib"),
       @"c:\wc");
  }
}

Add new files to the working copy

using(SvnClient client = new SvnClient())
{
  SvnAddArgs args = new SvnAddArgs();
  // TODO: Set optional settings on args

  client.Add(@"C:\file\in\workingcopy", args);
}

Check if a given path is a valid SVN working copy

public static bool IsWorkingCopy(string path)
{
    using (var client = GetSvnClient())
    {
        var uri = client.GetUriFromWorkingCopy(path);

        return uri != null;
    }
}

Find out if a particular folder/file has been marked for deletion.

public static bool IsDeleted(string path)
{
    if(!IsWorkingCopy(path)) return false;

    bool isDeleted;
    using (var client = GetSvnClient())
    {
        Collection<SvnStatusEventArgs> args;
        client.GetStatus(path, out args);
        isDeleted = args.Count > 0 && args[0].LocalContentStatus == SvnStatus.Deleted;
    }
    return isDeleted;
}
 
What’s even more awesome about the guys who wrote this library actively support it (even over twitter, thanks http://twitter.com/srijken!).
 
And that was even before I found out that they have a ready made .wxs file for integrating the .dlls into my WiX installer package. Awesome!
Categories: .NET Tags: , ,

Workflow does not start automatically when bulk inserting items

March 11th, 2010 1 comment

This had me tripped for a while. I was bulk inserting items (~800) to a list which had event receivers as well as a workflow attached.

The problem was that the workflow was not being triggered. Or if it did it just hung at In Progress.

After poking around for more than an hour I discovered that if I inserted a single item it worked. So to fix the issue I added a ten second sleep (Thread.Sleep) between the inserts and the workflows are triggering away happily.

Categories: SharePoint Tags: ,