background preloader

Technique Tips

Facebook Twitter

SPSecurity.RunWithElevatedPrivileges and Access Denied error on event receiver. After looksing half a day for a st00pid mistake I have to write about this to warn anyone that might run into similar problem.

SPSecurity.RunWithElevatedPrivileges and Access Denied error on event receiver

In VS I’ve prepared a custom event receiver which needed to be run as system account (for performing actions that the user running the event receiver doesn’t have – like setting permissions, creating subwebs,…) So my code began with something lilke that: public override void ItemUpdated(SPItemEventProperties properties) { base.ItemUpdated(properties); _properties = properties; //povišamo pravice na sistemski račun in zaženemo private metodo SPSecurity.RunWithElevatedPrivileges(doSomethingWithThis); } Best Practices: Using Disposable Windows SharePoint Services Objects. Summary: Learn best practices to follow when using Windows SharePoint Services objects to avoid retaining the objects in memory in the Microsoft .NET Framework. (29 printed pages) Scott Harris, Microsoft Corporation Mike Ammerlaan, Microsoft Corporation Roger Lamb, Microsoft Corporation Stefan Goßner, Microsoft Corporation Published: June 2006.

Best Practices: Using Disposable Windows SharePoint Services Objects

Working with BeforeProperties and AfterProperties on SPItemEventReceiver - MOSS Blog. SharePoint autocomplete lookup field with AJAX. SLAM! SharePoint List Association Manager.