Solution for this error
The reason behind this is a silly mistake that developers do, when trying to use
the SPSite/SPWeb objects. Here is the bad code that resulted in the
error:
Thats about it, my code started working when I removed the using clause from the SPContext.Current.Site. The same thing is true when you try to either explicitly/implicitly Dispose the SPContext.Current.Web object. So moral of the story never dispose SPContext objects either implicitly leveraging the using clause or explicitly by using Dispose method from in your finally block.
No comments:
Post a Comment