“The URL is invalid” error when trying to upload a file (SP 2010)

Jan 3, 2013 at 6:21 PM


I'm trying to setup Sharepoint 2010 (SQL Server 2008) to use SQL RBS for testing purposes. I followed all the steps required and in the process created a local folder C:\RBS_Store which serves as a BLOB store. The code samples (run from cmd) can access C:\RBS_Store and work fine. However, when I try to upload a file to a Sharepoint site from the browser/user interface, I get the following error:

"The URL 'file I'm trying to upload' 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."

and the file is neither uploaded to be seen in the browser nor it gets stored in the C:\RBS_Store. I have no such problem if I use the default FILESTREAM RBS provider.

OS: Windows Server 2008 Enterprise SP2 x64

Sharepoint log reveals that before the error is displayed, this is what happens:

"Exception thrown storing stream in new SqlRemoteBlob: System.TypeInitializationException: The type initializer for 'Microsoft.Data.SqlRemoteBlobs.ConfigItemList' threw an exception. ---> System.UnauthorizedAccessException: Access is denied. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED))"

I'm guessing this has something to do with permissions, but am not exactly sure what/where to look for. Any ideas or help would be apperciated.

Jan 14, 2013 at 10:12 AM

Your provider is not correctly attached to sharepoint. From SharePoint management shell do the following:

$cdb = Get-SPContentDatabase <ContentDatabaseName>
$rbss = $cdb.RemoteBlobStorageSettings

This will display the current provider status:


Enabled ActiveProviderName  MinimumBlobStorageS UpgradedPersistedPr
                                            ize operties
------- ------------------  ------------------- -------------------
   True MyTestProvider_01                     0 {}


If it does not show as above then you have something wrong and should step carefully through the instructions below:


Common problems are:

Enabled is set to false - simply run through the provider enable script again:

$cdb = Get-SPContentDatabase <ContentDatabaseName>
$rbss = $cdb.RemoteBlobStorageSettings

Provider name is not available - this can be to do with the provided .sql file and the various install configuration files. It is important that the .sql and the InstallProvider.cmd match correctly. Go over this with a finetooth comb! This can also be problems with the DB admin rights when attempting to run the RBS.msi file - make sure the user you are installing via has full access to the DB.

A simple error is the MinimumBlobStorageSize - make sure the file you are uploading to test is bigger than that!