SharePoint Experts, Information Architects, Expert Witness

SICG provides a broad array of business and technology consulting from architecture to design to deployment of global systems with a focus on surfacing data in the enterprise. We focus on the "How", not just the possible. Contact me direct: or call 704-873-8846 x704.

Search This Blog

Thursday, December 18, 2008

Cannot use Web Folder view in SharePoint

A common issue I hear from many clients - web folder browsing not working in Document and Image Libraries.

The cluprit is on the server - to work correctly the 'Web Client' Service must be running on all front end machines.

To fix (on each server), login and open Administrative Tools > Services. Scroll down until you find the WebClient service. Right click on the name and select Properties. On the properties page, change the Startup type to Automatic then click Apply. Next click the Start button then the OK button to close.

SharePointHelper Now in BETA

After much work, SICG's SharePointHelper is now in BETA.

SharePointHelper eliminates many of the common tasks needed when developing on or for SharePoint in applications, web parts, etc. Features include alert management, task management, database access, import/export files, manage lists and more.

The current BETA will be running for 30 days; if you are interested in the tool and seeing the documentation, please contact SICG at

Friday, October 3, 2008

JScript Error using SharePoint HtmlEditor Control

Just one of those "had the problem" and know others will...

When using the HtmlEditor in a web part, you may find that you start receiving JScript errors even though you a) may not have rendered the control and b) the code seems to execute fine all the way through the Render Event.

The problem is that the Control requires anchoring to the physical control on the page; if you define it in the OnLoad or CreateChildControls methods but DO NOT render the control, this situation will occur.

To get around this, you must render the control and Hide it using a Div as in:


NOTE: Do not use Visible=false; the control is not rendered and you will get the same error.

Monday, July 28, 2008

Unable to setup MOSS SSO Service

When attempting to setup Microsoft Office SharePoint Server 2007 Single Sign On Service, you receive the message:

You do not have the rights to perform this operation.

Even though you are logged in as the System Account or an account that is a farm administrator. The problem here is the actual Microsoft SSO service; open Services (Start > Administrative Tools > Services) and find the MS SSO Service. Right click on the service and select properties - click the Log On tab and check to see what account it is using - if it is the Local System, that is incorrect (this is the default setting). You must change this to be SharePoint Service account or the account running the Application Pool for SharePoint.

Tuesday, March 25, 2008

VMWare installation on XP prompts for Host

Had this problem? Install VMWare on XP and for some reason, you cannot connect to the host? Unlike the other problem I've mentioned in another blog, this one has been troublesome...

The fix:

1) Make sure IIS is installed before you install VMWare - if you don't, uninstall and start again

2) After IIS is installed, disable the default web site then install VMWare

3) If neither of the above work, add your IP/Machine Name to the Hosts file

If none of the above work, you are likely missing a service pack or have an old copy of VMWare.

Get or Set the Windows Default Printer in C#

I like many of you, struggled to find all of the pieces needed to get or set the default printer for a system. This is particularly useful for InfoPath - the InfoPath Interop Assembly doesn't provide any way to set the printer - it will simply print to the default.

Having had this issue, the following code resolves it all - and by the way, I included what you need for using statements (hate when folks leave that out!):

using System.Runtime.InteropServices; // Needed for DLLs
using System.IO; // Needed for FileInfo (to open the file)
using System.Xml; // Needed for the XML document namespace (if using InfoPath)
using System.Management; // Needed to Get/Set the printer

namespace WindowsApplication1
public partial class Form1 : Form
// Code by David M. Sterling - Sterling International Consulting Group
// Add the function to return the default printer:
[DllImport("winspool.drv", CharSet = CharSet.Auto, SetLastError = true)]
public static extern bool GetDefaultPrinter(StringBuilder pszBuffer, ref int pcchBuffer);
private const int ERROR_FILE_NOT_FOUND = 2;
private const int ERROR_INSUFFICIENT_BUFFER = 122;
/// SetTheDefaultPrinter

/// Printer name as string
public int SetTheDefaultPrinter(string PrinterName)
int ReturnVal = 0;
string DeviceIdPath = "win32_printer.DeviceId='" + PrinterName + "'";
using (ManagementObject PrinterObj = new ManagementObject(DeviceIdPath))
ManagementBaseObject ReturnedParameters =
PrinterObj.InvokeMethod("SetDefaultPrinter", null, null);
ReturnVal = (int)(uint)ReturnedParameters.Properties["ReturnValue"].Value;
return ReturnVal;
/// GetDefaultPrinter

/// Printer name as string
public string GetDefaultPrinter()
int pcch_Buffer = 0;
if (GetDefaultPrinter(null, ref pcch_Buffer))
return null;
int lastWin32Error = Marshal.GetLastWin32Error();
StringBuilder psz_Buffer = new StringBuilder(pcch_Buffer);
if (GetDefaultPrinter(psz_Buffer, ref pcch_Buffer))
return psz_Buffer.ToString();
lastWin32Error = Marshal.GetLastWin32Error();
if (lastWin32Error == ERROR_FILE_NOT_FOUND)
return null;
return "Error : unable to obtain the current default printer";

private void Form1_Load(object sender, EventArgs e)
string TheNewPrinterName = "HP Deskjet 6800 Series";
string DefaultPrinterName = GetDefaultPrinter();
// Print away...
// ...
// When done:

Tuesday, March 18, 2008

Link to the Microsoft Office SharePoint Server 2007 The Complete Reference Site and Blog

Alas, while not published inside the book, the official site for "Microsoft Office SharePoint Server 2007 The Complete Reference" by Osborne/Mcgraw-Hill is:

(You might have thought mosstcr, but the name of the book changed!).

From this site you can view the local blog as well as download the source from the book and the bonus web chapter on the Business Data Catalog.

Button Click Event does not fire on the first click

Having come across this several times and forgotten how I'd fixed it, I figured this will help more than a few...

The problem occurs in Buttons, DataGrids and other event driven controls in Web Parts and Controls. On the first time through, the primary event (like the Click event on a button), the event does not fire. On the second click however, everything seems fine. If you follow through in Debug, you'll file that the event is actually skipped and the control proceeds to the render event.

In most cases, the fix is simple: one of the controls within the control/web part has AutoPostBack = true where it doesn't need it. Typically, this is a cut and paste error - for example, adding AutoPostBack to a TextBox.

This, by the way, though very odd, is somewhat expected. The invalid postback on the control tells ASP.NET that it's already happened, when indeed it hasn't since the specific control cannot perform the actual postback.

Saturday, March 15, 2008

VMWare Prompts for Host to login to after installation

For those of you that use VMWare (and Virtual Server) like I do, there can be a very annoying issue with VMWare after install in which it will prompt you for a Server to login to (note: this applies to VMWare 1.04). Regardless of what you enter, the login will fail usually with the message "target machine actively refused" the connection.

While not always a guaranteed fix, you can try this simple one. On the system in question, open a command prompt and enter:

gpupdate /force

This is will update the Group Policies on the local system (note that in some cases, you may have to reboot). Once complete, try opening VMWare Server again and you should see the normal local host option.

Sunday, March 2, 2008

Alerts (Immediate and Workflow) not working in WSS/MOSS

You may have an issue in which SharePoint Alerts are not being sent, though you receive an alert when it is created.

The primary issue centered around the Timer Service and a few jobs that must be running for alerts to work. A few things to check for first:

1) Verify the Timer service is running and that it's identity (running as) is the SharePoint Service account (Start > Control Panel > Administrative Tools > Services). Locate the SharePoint Timer service in the list and see if it is running. If not, right click on it and start it. If it stops again, the user is likely incorrect. Right click on it and select Properties then on the Identity tab, verify the account in use (Local Service or similar is NOT correct); set this to be the SharePoint Service account, close out the properties and try to start it again. If it stops again, you will have to go to the Domain Policies and make sure that the service account has "Run as a Service".

2) Verify the necessary jobs exist (SharePoint 3.0 Central Administration > Operations > Timer Job Definitions):
Immediate Alerts
Workflow Auto Cleanup
Workflow Failover

If they do exist, check the Timer Job Status (SharePoint 3.0 Central Administration > Operations > Timer Job Status) and see if any of these are displaying errors (you should also check the System Application Event Log).

If the jobs do not exist, you may be in for some work depending on the installation. If the site was a restore, you may have created an issue Microsoft has identified - you can see this solution here:

However, as I discovered with one of my clients, a site that had been migrated (not the situation explained in the link above) was missing these jobs. After much investigation, I was able to simply add the jobs as follows:

Login to the server, get down to the command line and set your directory to be the SharePoint bin folder (usually c:\program files\common files\microsoft shared\web server extensions\12\bin). Verify the STSADM.exe file (the SharePoint command line utility) is there to make sure you are in the right folder.

Add the jobs to the site experiencing the problem by adding the jobs manually as so (Note: you should ONLY do this for the job(s) missing).

First you can verify whether the job already exists by using the command:

stsadm -o getproperty -propertyname job-immediate-alerts -url http://yoursite:port

If the job does not exist, you will recieve a message:

Property Exist="No"

If the job does exist, you will see a different message, such as:

Property Exist="Yes" Value="every 5 minutes between 0 and 59"

(In both cases, the message preceeded by a left arrow and closed with a slash-right arrow; this blog will not permit me to enter the exact syntax as it interprets it as HTML).

Verify this for all the job types:

Job Type: Property Name:
Immediate Alerts job-immediate-alerts

Workflow job-workflow

Workflow Auto Cleanup job-workflow-autoclean

Workflow Failover job-workflow-failover

To add the individual jobs:

Immediate alerts:

stsadm -o setproperty -propertyname job-immediate-alerts -url http://yoursite:port -propertyvalue "every 5 minutes between 0 and 59"


stsadm -o setproperty -propertyname job-workflow -url http://yoursite:port -propertyvalue "every 5 minutes between 0 and 59"

Workflow Auto Clean:
stsadm -o setproperty -propertyname job-workflow-autoclean -url http://yoursite:port -propertyvalue "daily between 22:00:00 and 06:00:00"
Workflow Failover:
stsadm -o setproperty -propertyname job-workflow-failover -url http://yoursite:port -propertyvalue "every 15 minutes between 0 and 59"

Use the Get Property command to verify that the jobs are created. Note that the URL MUST BE SPECIFIED AND CORRECT or you will simply receive 'Property Exist="No"'.

Hope this helps! Sure beat trying to follow the Microsoft solution (which may or may not have corrected the problem).

Wednesday, February 27, 2008

Unable to run Repair on SharePoint installation

Should you need to run a Repair operation on MOSS or WSS, it usually works well and can fix some unusual problems. However, on some in cases, you may encounter an error that looks like this:

In specific (in case you can't read the image), the message is:

Microsoft Office SharePoint Server 2007 configuration did not complete succesfully.
An installation package for the product Microsoft Office Shared Coms English Language Pack cannot be found. Try the installation again using a valid copy of the installation package 'osrvmui.msi'.
The cause is painfully simple - during the Repair operation the original installation media (DVD/ISO) MUST BE Mounted before hand. Unlike Microsoft Office, when the repair operation checks for this file, rather than request the media, it simply fails the operation.

A bit of an opener...

While I've usually very little time to keep up a blog, this one will be a start of some tidbits that I come across in the various projects and development SICG does.

Some of these will be notes that I was unable to add to my book, Microsoft Office SharePoint Server 2007 The Complete Reference. While impressive at 800 pages, the original manuscript was over 1700 pages - a lot had to be cut down due to publishing requirements.

I hope you'll find these tidbits useful!