The strange 409 error with Sharepoint

When coding there are errors that helps you to loose a lot of time and this is one of this...

I have a C# code used to upload files in a Sharepoint library (a small part of a complex architecture). In summary, the code retrieves the Sharepoint site structure and dinamically maps a treeview to the end user. The end user can select a folder and upload documents on it (it uses the System.Net.WebClient class).

During testing, I've choosed a folder called "Qualità" and when uploading a file, this was the Visual Studio 2008 response:

WSSException

A wonderful Server Error 409. All works perfectly on other folders.

I've spent hours of debugging and I've discovered that the error cause was on the folder name. This is what happens on the Sharepoint interface:

WSSException1

The folder called Qualità is translated into the URL /Qualit. If you create a new folder called for example Qualitò, it will be translated into the URL /Qualit1 and so on.

How to avoid this problem? If you have advice, please post here a solution... otherwise I've to instruct customers not to create folders with accents...

Technorati Tag:

Print | posted on Tuesday, February 17, 2009 5:36 PM

Comments on this post

# re: The strange 409 error with Sharepoint

Requesting Gravatar...
Have you tried "../Qualità/" and '../Qualità/'?
Left by Stephan on Feb 18, 2009 1:28 PM

# re: The strange 409 error with Sharepoint

Requesting Gravatar...
The problem is when you use ftp there are probblems with strange caracters and spaces since FTP is more like UNIX.

I have encountered those problems before and above did the trick for me.
Left by Stephan on Feb 18, 2009 3:42 PM

# re: The strange 409 error with Sharepoint

Requesting Gravatar...
My code reads the Sharepoint folders and builds the URL accordingly to the site's structure.
It reads the folder name 'Qualità' correctly, but if you have folder names with accents the URL must be composed as /Qualit (you have to truncate the last letter) or the URL result as missing in Sharepoint.
Left by Stefano Demiliani on Feb 18, 2009 3:48 PM

# re: The strange 409 error with Sharepoint

Requesting Gravatar...
used to upload files in a Sharepoint library (a small part of a complex architecture). In summary, the code retrieves the Sharepoint site structure and dinamically maps a treeview to the end user. The end user can select a folder and upload documents on it (it uses the System.Net.WebClient class).

During testing, I've choosed a folder c
Left by wholesale laptop battery on May 23, 2010 2:48 PM

Your comment:

 (will show your gravatar)
 
Please add 5 and 5 and type the answer here: