Document Library and ItemAdding Event

               In one of our project, we are supposed to lock down the users from creating folders at ROOT in document library. We thought of restricting through event handler. During coding we found that, ItemAdding event doesn't provide enough information to determine where the folder is been added.

              Searching on net, we found that was the bug in MOSS, and Microsoft has provided a hotfix. You can get the Hotfix information in the below URL. It not only solves this problem, but also couple of other bugs, which you can find it in this URL.

http://support.microsoft.com/default.aspx?scid=kb;EN-US;934790

             After installing this hotfix, you will get the AfterUrl property is having the information to determine where the folder/file is been added. But be careful in installing this hotfix, bcose sometimes it might negatively affect your project. We faced a problem of 'Access denied' error message for accessing LOGS folder programmatically. So, testing the hotfix completely in a test environment is mandtory b4 installing on Development/Production machines.

 Satheesh Palaniswamy. 

 

Leave a Reply