I recently faced this error while i was working on some object model and by looking into the code i realized that i did a little mistake.
This error itself states everything. I used the current site object in the using clause while performing some operation. we should never close the SPContext.Current.Site when we deal with any coding. If we have manually declared any site or web object, then only we have to dispose them.
I made this correction and my code worked well.
I hope this helps others not to repeat the same mistake again.
This error itself states everything. I used the current site object in the using clause while performing some operation. we should never close the SPContext.Current.Site when we deal with any coding. If we have manually declared any site or web object, then only we have to dispose them.
I made this correction and my code worked well.
I hope this helps others not to repeat the same mistake again.
No comments:
Post a Comment