“The form cannot run the specified query” in InfoPath 2007 Forms Migrated to SharePoint 2010

InfoPath 2007 forms migrated to a SharePoint 2010 site may show this error. It happens when the form contains controls which populate data from a SharePoint list using the following URL in data connection.

http://site/_vti_bin/owssvr.dll?Cmd=Display&List={list_GUID}&XMLDATA=TRUE

The ULS errors being logged for this error would be,

 The form cannot run the specified query. The remote server returned an error: (400) Bad Request.)

A workaround for this problem is to modify the data connection and append “&noredirect=true” to the URL. So the resulting URL would look like

http://site/_vti_bin/owssvr.dll?Cmd=Display&List={list_GUID}&XMLDATA=TRUE&noredirect=true

Advertisements

Restoring Deleted Site Collections

One of the best features that SP1 brought to SharePoint administration is the ability to recover deleted site collections. I’ve had many incidents where this came handy.

You have to use PowerShell or Object Model recover a deleted site collection. Here is how you can do it using PowerShell.

In SharePoint 2010 Management Shell, provide the following command.

Restore-SPDeletedSite -Identity <relative URL or GUID>

More details on this command can be found in this Technet article. The deleted site collections are stored as SPDeletedSite objects. If you do not remember the URL or GUID of the deleted site collection, you can find it using the command,


Get-SPDeletedSite

 

SPUpdatedConcurrencyException While Installing SharePoint 2010 Service Pack 1

After installing SharePoint 2010 Service Pack 1 for SharePoint Server, the SharePoint Products and Technologies Configuration Wizard (either from GUI or using PowerShell) may fail throwing the following exception.

An exception of type Microsoft.SharePoint.Administration.SPUpdatedConcurrencyException was thrown. Additional exception information: An update conflict has occurred, and you must re-try this action. The object SPUpgradeSession Name=Upgrade -20110924-194525-15 was updated by DOMAIN\ACCOUNT, in the PSCONFIG (7240) process, on machine SERVER. View the tracing log for more information about the conflict.

Total number of configuration settings run: 3

Total number of successful configuration settings: 2

Total number of unsuccessful configuration settings: 1

Successfully stopped the configuration of SharePoint Products.

Configuration of SharePoint Products failed. Configuration must be performed before you use SharePoint Products. For further details, see the diagnostic log located at [LOCATION OF LOG] and the application event log.

This KB article describes the cause and and solution for this issue. The suggested solution is to clear Windows SharePoint Services configuration cache. Unfortunately, this may not work in most of the cases. If it doesn’t work, there is another workaround. This is by setting the ‘command-line-upgrade-running’ configuration property to ‘No’ and running Configuration Wizard again. Entire steps are given below.

  1. Open command prompt as administrator.
  2. Type in the command: stsadm -o setproperty -pn command-line-upgrade-running -pv No
  3. Restart IIS and SP Timer
  4. Run configuration wizard: psconfig -cmd upgrade -inplace b2b -wait –force

The entire steps has to be done in all the web and app servers.