Invalid URL error using RBS in SharePoint

Posted by:

Bookmark and Share


If you are developing a custom RBS provider or using the MSFT sample provider available here  , chances are you will be encountered with the following error

The URL ‘Library/Document’ 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

This error is so frequent that the RBS team documented it in the SQL 2008 RBS whitepaper.

Since the above guide is more related to the FILESTREAM provider, the troubleshooting steps are not that helpful. However, you do get an idea of how to debug this. Looking at the ULS logs you may find the following entry

No provider of type <File> found. Check the server configuration or install the provider on the client

Still not very helpful, but looking at the event log you find “Could not load file or assembly ‘<ProviderAssembly>’ or one of its dependencies. Failed to grant permission to execute.” Surely, this is a Code Access Security issue since the Provider Assembly was not deployed in GAC during installation.

There are two possible resolutions of this issue

  1. Set the WSS_Minimum trust level of your SharePoint web.config to Full (Not recommended for Production environments)
  2. Install your Provider assembly in the GAC.

You fix the above error only to find that it still exists

This time around it is because the RBS Client Library executes and loads the custom Provider in the context of SharePoint application pool (with default impersonate=false). You need to make sure that the user account configured in the application pool has rights to read and write on the folder (Local or Network) which is designated as the external blob store.

Hopefully, this will get you going with your new RBS configuration.



About the Author:

Irfan Bashir: A SharePoint Architect with 11 years of industry experience with Microsoft technologies, Irfan has developed solutions for all versions of SharePoint, from SharePoint 2001 to SharePoint 2010. Irfan is the lead architect for a SharePoint Online-based suite of applications, and is also involved in designing migration products for SharePoint 2007, SharePoint 2010 and Office 365. Irfan has worked extensively on web-based and client-server technologies using C++, C#, ASP.NET, JavaScript, etc. [ Contact Irfan ]

Add a Comment

You must be logged in to post a comment.