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

    Question

  • I'm working on sharepoint farm,and after inmplement and moving to production, we used to add new pages and create new webpart, and for that we used "smartpart", and 3 days back after i moved my new controls and pages from tes environment to production server, and get error for adding new "smart part" saying "Cannot save the property settings for this Web Part. Exception occurred. (Exception from HRESULT: 0x80020009 (DISP_E_EXCEPTION))" , so i used the sharepoint designer to add it, but i noticed that each time i add any webpart form built-in sharepoint, i get same past error and anthoer one for List and library webpart saying :"maybe the list is hidden".

    that's make working useless for 2 days back to fix it , i check most of forums looking for such error but they was having problem with custom webpart they developed not the Original like i have,
    and makes working with the portal very headache,

    have anyone ever experince such case. can help me find solution to adding webparts from browser.
    Web Developer
    Monday, September 01, 2008 10:50 AM

Answers

  • Same issue for me, I was using SPWeb web = SPContext.Current.Web. It worked well until I started Impersonate my WebUserControl and adding a browsable prop.

    Here is my working code using impersonation (see how to retreive usertoken or remove this argument):
    using (SPSite site = new SPSite(SPContext.Current.Site.ID, SPSuperUser.UserToken))
    {
    	using (SPWeb web = SPControl.GetContextSite(Context).OpenWeb())
    	{
    		...
    	}
    }

    Thanks Jesper , this solved my issue.

    cheers,
    Damien
    Monday, April 20, 2009 1:45 PM

All replies

  • I have had the same error in one of my webparts. Also when I tried to save a property. You have not posted any code so I cant really say for sure that this will solve your proplem but the following helped in my case:

    If you are calling
     Using(SPWeb web = SPControl.GetContextWeb()) the error will popup.

    But if you call: Using(SPWeb web = SPControl.GetContextSite(Context).OpenWeb()) it won't.


    Jesper
    • Marked as answer by Michael Washam - MSFT Wednesday, September 03, 2008 2:58 PM
    • Unmarked as answer by Baso Wednesday, September 10, 2008 12:00 PM
    • Proposed as answer by Jedaba Monday, April 20, 2009 1:32 PM
    Monday, September 01, 2008 12:01 PM
  • Tanx Jesper for your reply.
    actually what i have here is something related to sharepoint seeting maybe or kind of configuration missed during doing some updat on the server , that explain why the error happened with the builtin webparts not just with the one we already created.

    I am trying o diagnose it and doin new retore into another sharepoint server on test machine, just to check if the restored site working on another machine , so hopefully i can get better idea of why that happened.

    Web Developer
    Tuesday, September 09, 2008 8:10 AM
  • i stepped more in diagnose that problem i noticed that whenever new page created using default masetr page that comes with SharePoint itself , everyhting will goes right and any control even smart part can be added and used correctly,
    so maybe it seems kind of security issue comes up when new custom master pages have added to the sharepoint site, or some wrong updates during the publishinf process affected the whole process
    Web Developer
    Wednesday, September 10, 2008 10:40 AM
  • I have had this happen to the smart part before as well. Have you changed the UserControl that was originally on the page and re-uploaded the User control to the server? If so in the User Control drop down in the SmartPart Properties you will probably see 2 entries with the same name. The only way I have found around this was to switch the page to a similar page layout (which will only work for publishing sites) and then switch it back to the original page layout and select the other item with the same name as the User Control you want. The web part then saves the properties fine and the page works.
    Friday, September 12, 2008 7:05 PM
  • Same issue for me, I was using SPWeb web = SPContext.Current.Web. It worked well until I started Impersonate my WebUserControl and adding a browsable prop.

    Here is my working code using impersonation (see how to retreive usertoken or remove this argument):
    using (SPSite site = new SPSite(SPContext.Current.Site.ID, SPSuperUser.UserToken))
    {
    	using (SPWeb web = SPControl.GetContextSite(Context).OpenWeb())
    	{
    		...
    	}
    }

    Thanks Jesper , this solved my issue.

    cheers,
    Damien
    Monday, April 20, 2009 1:45 PM