Wednesday, 27 October 2010

The URL ... It may refer to a nonexistent file or folder, or refer to a valid file or folder that is not in the current Web"

Today I got this error and it took me a while before I found the solution.

The error occured when I was trying to upload a Word document to a Document Library. I did not even get the form where I could add the required data. Meanwhile creating a new document was no problem.
The Docuemnt Library was a default library, where I had programmatically added a few columns.

I began to start focusing on these column, and I deleted them one after another an then, BINGO! When I deleted a SPFieldBoolean column, I could suddenly upload documents.
This columns default property was set to "Yes" and this was all wrong.
Even though its a string property it shall be set to either 0 or 1 meaning no and yes.

Lesson learned.