"Value does not fall within the expected range" Error when try to upload a document RRS feed

  • Question

  • I created a list tempate. The base type of the list template is the document. I found that after I create the document library using my list template, I got "Value does not fall within the expected range" error when try to uploade a document.


    For my repro steps, I first created a list tempate by following article It is a very well written article.

    The only change I made is I changed the BaseType of ListTempate from 0 to 1. That is from list to document library.


    When I tried to upload any file, I got the "Value does not fall within the expected range" error. But the file is actually uploaded although there is error message.


    What should I do to make it work?


    Thank you very much for your consideration. Any suggestion will be greatly appreciate.



    Friday, June 27, 2008 2:44 AM

All replies

  • I don't know why you are getting that error, but I can give you another suggestion to build list definitions. The article you mentioned is a great article for building them from scratch, but I have found they are time consuming and can be difficult to build this way. So, here is an approach to have it built for you.

    Download Visual Studio Extensions for WSS. Then, create a list on a SharePoint site (it doesn't matter what site - it can even be a test site). Next, configure the list exactly how you want it. Then, run the solution generator tool that comes with VSeWSS. This has a list definition wizard in it (I like to think of it as a reverse engineering tool). This will create a feature for your custom list definition. It creates the feature in a VSeWSS solution, which I don't like that much - but you can easily copy the feature out into your own solution (fyi: I like WSPBuilder for my solutions).

    Anyways, I know I didn't answer your original question, but this alternate approach should be much quicker and much less error prone because it elimates the manual intervention pieces of typing out xml files yourself (which it is easy to mess up - believe me, I mistype these xml files all the time Smile).


    Friday, June 27, 2008 3:05 AM
  • Thank you so much for your reply. I will try definitely try that. Also if there is one other solution comes up in a couple days. I will mark this as answer.


    Thank again for your help.


    Best regards,



    Friday, June 27, 2008 7:56 AM