Cannot upload or edit document in SharePoint 2007/2010


Today I was called by a company who have encountered an interesting issue regarding a SharePoint environment within their organization. They reported that “it is not possible to edit / save files to SharePoint 2007” and were getting the following error:

[Update 31-1-2012]
Before further reading, check if it is not a simple free space issue with on your database server.

This occurs in every situation:
• At all users, even systemaccount
• At all sites
• From every client
• At all webapplications and also at different content databases.

They reported that
• We cannot create files
• We cannot upload files
• We cannot overwrite files
• We can edit file properties
• We can delete files to bin
• We can delete files entirely
• We can restore files form bin

There seems to be no error at SQL server, no low diskspace, no databaselimit reached.

VERBOSE LOGGING:
ISPExternalBinaryProvider::StoreBinary failed. Error 0x80004005.

The URL ‘Shared Documents/file.xlsx’ is invalid. It may refer to a nonexistent file or folder, or refer to a valid file or folder that is not in the current Web.

Application error when access /_layouts/Upload.aspx, Error=The URL ‘Shared Documents/file.xlsx’ is invalid. It may refer to a nonexistent file or folder, or refer to a valid file or folder that is not in the current Web. at

Microsoft.SharePoint.Library.SPRequestInternalClass.PutFile(String bstrUrl, String bstrWebRelativeUrl, Object varFile, PutFileOpt PutFileOpt, String bstrCreatedBy, String bstrModifiedBy, Int32 iCreatedByID, Int32 iModifiedByID, Object varTimeCreated, Object varTimeLastModified, Object varProperties, String bstrCheckinComment, UInt32& pdwVirusCheckStatus, String& pVirusCheckMessage) at

Microsoft.SharePoint.Library.SPRequest.PutFile(String bstrUrl, String bstrWebRelativeUrl, Object varFile, PutFileOpt PutFileOpt, String bstrCreatedBy, String bstrModifiedBy, Int32 iCreatedByID, Int32 iModifiedByID, Object varTimeCreated, Object varTimeLastModified, Object varProperties, String bstrCheckinComment, UInt32& pdwVirusCheckStatus, String& pVirusCheckMessage)

The client reported the issue started after upgrade of CommVault Simpana Agent’s from version 8 to 9. They have removed all the agents, rebooted both servers. This did not resolve the issue.

Somehow it looks like that there is an issue with the External Storage provider while the client did not use that kind of functionality of CommVault. To check if an External storage (RBS) provider is configured you can run the following Powershell script.

 [System.Reflection.Assembly]::LoadWithPartialName('Microsoft.SharePoint')
 $farm = [Microsoft.SharePoint.Administration.SPFarm]::Local
 $farm.ExternalBinaryStoreClassId

Which resulted in the following results.

So it clearly looks like some kind of external storage provider is configured. The next step was to check if the component was successfully registered in the Component Services.

· Go to Administrative tools
· Go to Component Services
· Open DCOM Config
· Find the given GUID

Unfortunately the given ID was not found, thus SharePoint could not contact the DCOM object to store document.

To resolve the issue the External Storage (RBS) provider we need to reset the configuration.

 [System.Reflection.Assembly]::LoadWithPartialName('Microsoft.SharePoint')
 $farm = [Microsoft.SharePoint.Administration.SPFarm]::Local
 $farm.ExternalBinaryStoreClassId = [system.guid]::empty
 $farm.Update()

After these lines you have to IISRESET and restart the SPTimerV3

References
http://msdn.microsoft.com/en-us/library/bb802799.aspx

SharePoint and Office Quickpart date formatting


Recently we had an issue with date formatting within Office 2007/2010. When you drop a QuickPart field which references a date field in SharePoint the date formatting will not be equal to the regional settings of the SharePoint site where the document resist. The solution to this problem is rather simple, when you have spent some time digging into Office 2010.

· If the situation that the Developer tab in Word is not enabled, enable it.
Word 2007: Word > Options > Popular
Word 2010: File > Options > Customize Ribbon in Word 2010

· In the document, insert the document property as usual.

· Click the document property, then click on its name (see figure).
Click Developer tab > Controls group > Properties

· Now you are able to modify the date formatting by selecting one of the predefined formats from the list or by defining a custom format.

· Click OK

There you go! A custom format has been set. Unfortunately this is not a solution in a multi-language environment. Every template has to be preconfigured.