Cannot save the property settings for this Web Part. Exception occurred. (Exception from HRESULT: 0x80020009 (DISP_E_EXCEPTION))

I personally hate this post...but it did work for my developer :


If you are using the "using" statement on the webpart page load, you might end up getting this.


Wrong Coding for this scenario :
using(SPWeb oWeb = SPControl.GetContextWeb(Context))
{
....
}


Correct way of using :


SPSite site = new SPSite(SPContext.Current.Site.ID);
--
site.Dispose();

Comments

Popular posts from this blog

Linksys Wireless Connection Failure

The security validation for this page is invalid. Click Back in your Web

Access Denied Host Header Sharepoint 2010 Windows Server 2008 R2