0

I am using SaveBinaryDirect method to upload file to SharePoint library. I am getting error like below the remote server returned an error 414 request uri too long

Can anybody help me please

Srinivas Sabbani
  • 109
  • 3
  • 10

2 Answers2

1

I wouldn't call this a SharePoint problem necessarily, more like a problem that happens a lot in SharePoint... Essentially, you have around a 2,000 character limit for the URL. In most scenarios this is fine, however in SharePoint it occasionally becomes an issue.

Users tend to create a lot of nested libraries and the name of each library becomes part of the URL - separated by '/'. Then the file name is added at the end of the URL. And to make matters worse, if there are any spaces or un-URL friendly characters, they are encoded and become three characters each - space becomes %20. This all adds up.

In my experience the solution is a combination of user education and proper architecture. Instead of creating nested libraries, store the documents in a single library and differentiate the items by assigning meta-data attributes, then create views to display items of a particular type.

popdan
  • 471
  • 1
  • 6
  • 11
1

This error can also be cause by having "invalid" characters in the filename or path. See this answer for what makes a character invalid in a URI:

Which characters make a URL invalid?

Community
  • 1
  • 1
camainc
  • 3,750
  • 7
  • 35
  • 46