Showing posts with label The specified file or folder name is too long. Show all posts
Showing posts with label The specified file or folder name is too long. Show all posts

03 June, 2014

The URL for this file is too long for the application

One of our business owners has reported an issue “SharePoint reporting these errors when I open an Excel file, you can support me in check if not missing any site configuration.”

Error #1:
The URL for this file is too long for the application.  A temporary copy of this file will be opened on your computer.  You must save this copy as a new file. – This is the most common one where many levels of nested sub folders in a library.  If your folder paths start exceeding 120 characters by themselves, it's time to reorganize your content folders.

Error #2:
The specified file or folder name is too long. The URL path for all files and folders must be 260 characters or less (and no more than 128 characters for any single file or folder name in the URL). Please type a shorter file or folder name.
Troubleshoot issues with Windows SharePoint Services.

Error #3:
The URL for this file is too long for the application.  A temporary copy of this file will be opened on your computer.  You must save this copy as a new file

I think this is an old (in fact very old) / generic error message which come while editing the office documents. Let’s try to understand a little background behind this issue!

What’s the cause behind this issue?

What the above article saying?
This behavior occurs if the number of characters in the URL exceeds the maximum number of characters that is supported for URLs in SharePoint Server 2007 / 2010, in SharePoint Portal Server 2003, and in Windows SharePoint Services.

To determine the length of a URL, SharePoint Server 2007, SharePoint Portal Server 2003, and Windows SharePoint Services convert the string in the URL to Universal Character Set (UCS) Transformation Format 16 (UTF-16) format, and then count the number of 16-bit characters in the string. A URL that contains more than 260 characters is not supported.

Additionally, a URL that contains one or more of the following components is not supported:
1.    A folder name that has more than 256 UCS-2 characters
2.    A file name that has more than 128 characters

More details on “Understanding URL and path lengths”, “URL path and restrictions”, “Resolving URL length problems”:

Resolution:
Make sure that the names of folders and of files do not exceed the maximum lengths that are supported for URLs in SharePoint Server 2007, in SharePoint Portal Server 2003, and in Windows SharePoint Services.

Workaround:
Reduce the SharePoint URL’s, How to do this? – Here is the reference:

If you have any queries/questions regarding the above mentioned information then please let me know. I would be more than happy to help you as well as resolves your issues, Thank you.

Note:
If you find a different solution, please report it as a comment to this post. Be sure to double-verify it: undo your solution and verify that the problem comes back, then redo it and verify that the problem goes away.

Reference:

Product applies to:
·         SharePoint 2010
·         SharePoint 2013

27 February, 2013

URL path length restrictions (SharePoint Server 2010)

I have come across so many users who are not able to create or upload files after certain stage and it says

"The specified file or folder name is too long"

This is Limitation is in Sharepoint 2007 and continues in 2010.

The total length of a SharePoint URL equals the length of the folder or file path, including the protocol and server name and the folder or file name, plus any parameters that are included as part of the URL. The formula is as follows:
  • URL = protocol + server name + folder or file path + folder or file name+ parameters
For example, the following is a typical URL path to a file stored in Microsoft SharePoint Server 2010:
http://www.contoso.com/sites/marketing/documents/Shared%20Documents/Promotion/Some%20File.xlsx


When you go to the site and open the file with Microsoft Office

http://www.contoso.com/sites/marketing/documents/_layouts/xlviewer.aspx?id=/sites/marketing/documents/Shared%20Documents/Promotion/Some%20File.xlsx&Source=http%3A%2F%2Fwww%2Econtoso%2Ecom%2Fsites%2Fmarketing%2Fdocuments%2FShared%2520Documents%2FForms%2FAllItems%2Easpx%3FRootFolder%3D%252Fsites%252Fmarketing%252Fdocuments%252FShared%2520Documents%252FPromotion%26FolderCTID%3D0x012000F2A09653197F4F4F919923797C42ADEC&DefaultItemOpen=1

The limitations In this section apply to the total length of the URL path to a folder or a file in SharePoint Server 2010 but not to the length of any parameters. Also, these limitations apply only to un-encoded URLs, not to encoded URLs. There is no limit to encoded URLs in SharePoint Server 2010. The limitations are the following:
  • 260 Unicode (UTF-16) code units – the characters in a full file path, not including a domain/server name.
  • 256 Unicode (UTF-16) code units – the characters in a full folder path, not including the file name and the domain/server name.
  • 128 Unicode (UTF-16) code units - characters in a path component, that is, a file or folder name.
  • 260 Unicode (UTF-16) code units – the characters in a full path, including a domain/server name for use with Office clients.
  • 256 Unicode (UTF-16) code units – the characters in a full path including the domain/server name, for use with Active X controls.
Reference :