Wednesday, October 14, 2009

MOSS Search Content Source “Stopping”

Sometimes when you stop a content source from indexing, it gets stuck with a status of “Stopping”.  I’ve waited this out before for over 24 hours and this doesn’t change.

A simple fix is to force the office search process to start using the following stsadm command:

stsadm –o osearch –action start

Run this on your index server and the troublesome content source should switch back to idle.

Thursday, September 3, 2009

Access Denied running stsadm on Windows Server 2008

Simply run your command prompt as an administrator:

  1. Right click on your command prompt
  2. Click “Run as administrator”

RunAsAdmin

Wednesday, July 1, 2009

CRM 4 - Cannot See New Button on Custom Entity

I just investigated a problem where a CRM user could not see the "New " button for a custom entity with a relationship to the User built in entity:

The user had read/write permissions on the custom entity but it turns out they also need the "Append To" permission on the User entity as well:

Note About Security

  • Append To allows another entity to be appended to this one (i.e. a Bank Account record to be appended to the User record in my example)
  • Append allows this entity to be appended to another (the other must have the Append To security right!)

Wednesday, June 17, 2009

SharePoint - VSeWSS Error: Value does not fall within the expected range

Working with VSeWSS recently, I came across a very frustrating error when packaging (or deploying which includes the package process):

Error: System.ArgumentException
System.ArgumentException: Value does not fall within the expected range.

In my case the reason for this was a missing file in the solution i.e. the Visual Studio project file is referencing a file that doesn't exist on disk:

This file is referenced in one of the manifests:

To fix try one or more of the following:

  • Expand all the folders in your solution and look for a missing file
  • Get the latest from source control
  • Ensure the file is in the correct location
  • Make sure your colleagues add new files to sourcecontrol!

Hopefully this will save someone some time!

Saturday, May 16, 2009

SharePoint People Picker Returns No Results

I ran into an interesting issue on my SharePoint development environment recently where my people picker was returning no results when searching for users by name, or browsing all users:

The warning message is:

No results were found to match your search item. Please enter a new term or less specific term.

By default the SharePoint people picker uses the farm account to query Active Directory to retrieve this information. If your farm account does not have permission to query AD then your people picker will return no results. As it happened my dev environment was using a local account and hence was failing. To fix run the following stsadm commands:

  1. stsadm -o setapppassword -password password
  2. stsadm -o setproperty -pn peoplepicker-searchadforests -pv "domain:domaintosearch.com,username,password" -url http://centraladminurl

Run this for each web application that is seeing the problem, and you should see the following result:

Resources

Note from Technet

If Password is used, you need to run stsadm –o setapppassword -password on every front-end Web server first. The could be any string, and is used as the key to encrypt the password in the domain:DnsName,LoginName,Password or forest:DnsName,LoginName,Password and store the encrypted password in the database. However, if the domains or forests are trusted, it is not necessary to pass in the login name or password. The following format is used: forest:DnsName or domain:DnsName.

Update

This behavior typically happens when the account that is running the application pool for the site you are running, is not a domain account. It is good practice to use domain accounts for SharePoint services, but this is not always practical for development environments.

Monday, May 4, 2009

Missing Property Mapping Fields in SSP User Profile Properties

Today I was configuring user profile properties for a SharePoint intranet site and ran into a problem where I couldn't see the property mapping settings when configuring an individual property:

The actual error reported is:

Note: The selection of directory service properties is disabled because the portal is in an untrusted domain or no directory service import is configured yet. 

After much Google searching I found an archived post from the now defunct site http://paulhorsfall.co.uk.  The fix suggested is that the SSP application pool must use a domain account.  My SSW app pool had been configured to run under a local account...

To fix:
  1. In Central Administration, go to Operations
  2. Click the Service Accounts link
  3. Click the web application pool radio button then select the application pool for your SSP in the drop down list
  4. Change the account to a domain account and click OK
When the app pool has restarted, the mapping properties should be available again:

Thanks to Paul Horsfall for initially reporting this fix!


Thursday, March 5, 2009

CRM in Firefox

To use Microsoft Dynamics CRM, you are forced to use IE6, IE7 or IE8.  Or are you?

If you are running Firefox 3, you can download an add-on called IE Tabs.  This tool allows you to run IE tabs in Firefox.  In addition to opening IE tabs, you can specify sites that should by default, use an IE tab.  Example add the URL "http://www.microsoft.com/*" to open all pages under the microsoft domain in an IE tab.


Under the skin, the add-on is using the IE engine but if you were having problems with the speed of the IE browser (like me) this can be a big relief!

Wednesday, March 4, 2009

CRM 4 - Import Organization User Mapping Error

When importing an organization into CRM, you may encounter the following error message:

At least the setup user needs to be mapped before this organization can be imported

There are a few steps you may need to take to resolve this issue:

Determine the Status of Your User

The following query will tell you about the user you are attempting to import the organization with:

select systemuser.domainname, rolebase.name, roles.systemuserid, systemuser.accessmode, systemuser.setupuser
from systemuserroles roles 
inner join systemuser on roles.systemuserid = systemuser.systemuserid
inner join rolebase on rolebase.roleid = roles.roleid
where domainname = '{domain}\{username}'

Example results:

domainname   {domain}\{username}
name   System Customizer
systemuserid    {GUID}
accessmode   1
setupuser 0

'Name' should be System Administrator

Your user should have the role of System Administrator to import the organization.  Determine the correct GUID from the rolebase table for the System Administrator role, and update the systemuserroles for your systemuserid.

Accessmode and Setupuser values

Accessmode is used to specify whether the user is allowed to run the CRM setup program.  For some reason setting this to false i.e. '0' has proven to help resolve the issue.  In addition the setupuser value has to be set to true i.e. '1'.

When these values have been set, restart the Deployment Manager and import your organization!

Sunday, March 1, 2009

SharePoint 2007 Site Templates or Site Definitions?

Site templates and site definitions are two separate customizations you can undertake. You need to make a decision based on your requirements as to which is best.

Site templates

Pro's:

  • Easy to create and reuse through the SharePoint interface
  • Ideal for end users
  • A site template is a customization of the underlying default site definition

Con's:

  • Dependency on underlying site definition means SharePoint updates could break your site templates
  • Poor performance since the modifications are held in the database and are read from the DB and compiled on each request
  • Limited customization options

Site definitions

Pro's:

  • Made by developers and site administrators
  • Independent of SharePoint default site definitions so not affected by SharePoint updates
  • Limitless customization options
  • Can be cached on the file system so is fast to load

Con's:

  • Harder to create: involves coding XML
  • Difficult to modify when deployed

Note: The site template does not store the complete definition of a site - only the differences from the underlying site definition. Move the site template from one site collection to another and you lose the underlying site definition and run into problems such as missing content types (since these are part of the site definition).

Check out Google for info on creating custom site definitions.