I have just created a new web application and site collection in SharePoint 2013. With a large number of documents to place into a Document Library I thought it would be easier to copy and paste them using Windows Explorer, so I opened the document library and click Open with Explorer.
The filename you’ve specified is either invalid or too long Specify a different filename.
filename invalid too long specify different name excel sharepoint
As a test I tried to upload a single file using the browser but this generated the following error:
Sorry, something went wrong.The URL ‘Shared documents/Project budget.xlsx’ is invalid.
something went wrong url invalid
The filename isn’t very long at all, including the full path, so I found this quite strange. I immediately started looking through the ULS logs and the following entry caught my eye, which was logged at the same time I tried to upload the files:
Exception thrown storing stream in new SqlRemoteBlob: System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. —> Microsoft.Data.SqlRemoteBlobs.BlobStoreException: There was a generic database error. For more information, see the included exception. —> System.Data.SqlClient.SqlException: RBS Error. Original Error: Number 297, Severity 16, State 1, Procedure rbs_fs_sp_check_pool_size, Line 31, Message: The user does not have permission to perform this action. Transaction count after EXECUTE indicates a mismatching number of BEGIN and COMMIT statements. Previous count = 1, current count = 0. at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction)
I do have RBS (Remote Blob Storage) enabled for this content database so it appears that this has got messed up somehow. After reading various other blog posts and TechNet articles I began some trial and error with the database permissions. The only way I found to solve this was to grant the service account used by the application pool db_owner rights on the content database, in addition to the db_rbs_* permissions.
SP portal AppPool Permissions
The original error about the filename being too long or invalid is very misleading, there is no hint of a permissions issue until digging into the ULS logs.