Whenever I try to edit the shared properties of my custom web part in sharepoint 2007, I get the following error:
Exception has been thrown by the target of an invocation.
at System.RuntimeMethodHandle._InvokeMethodFast(Object target, Object[] arguments, SignatureStruct& sig, MethodAttributes methodAttributes, RuntimeTypeHandle typeOwner)
at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture, Boolean skipVisibilityChecks)
at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
at Microsoft.SharePoint.WebPartPages.ExtendedPropertyInfo.GetValue(Object target, Object[] indexValues)
at Microsoft.SharePoint.WebPartPages.PropertySheetProperty.get_Value()
at Microsoft.SharePoint.WebPartPages.PropertySheetProperty.get_IsNull()
at Microsoft.SharePoint.WebPartPages.PropertySheetProperty..ctor(WebPart targetWebPart, SPWebPartManager webPartManager, PropertyInfo pi)
at Microsoft.SharePoint.WebPartPages.PropertySheetProperties.GetProperties(WebPart targetWebPart, SPWebPartManager manager, Boolean inPersonalizationMode, IPropertySheetPropertiesFilter filter)
at Microsoft.SharePoint.WebPartPages.CustomPropertyToolPart.CreatePropertyGrid()
at Microsoft.SharePoint.WebPartPages.CustomPropertyToolPart.CreateChildControls()
at System.Web.UI.Control.EnsureChildControls()
at System.Web.UI.Control.PreRenderRecursiveInternal()
at System.Web.UI.Control.PreRenderRecursiveInternal()
at System.Web.UI.Control.PreRenderRecursiveInternal()
at System.Web.UI.Control.PreRenderRecursiveInternal()
at System.Web.UI.Control.PreRenderRecursiveInternal()
at System.Web.UI.Control.PreRenderRecursiveInternal()
at System.Web.UI.Control.PreRenderRecursiveInternal()
at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
I do have some custom properties in my web part, which set the email addresses for notification emails that are generated by the form. An example of this is:
[WebBrowsable(true),
Personalizable(true),
DefaultValue("[email protected]"),
Category("Email Properties"),
Microsoft.SharePoint.WebPartPages.WebPartStorage(Microsoft.SharePoint.WebPartPages.Storage.Shared),
Microsoft.SharePoint.WebPartPages.FriendlyName("Email Addresses (separate multiple emails with a comma):"),
Description("Please enter the email addresses for those that should be notified when an incident takes place at a Corporate location.")]
public string CorpMessageEmailAddresses { get; set; }
However, even with these properties commented out, I still get an error when trying to modify the web part.
Has anyone else ever dealt with an issue like this? I can provide more information or code snippits, if needed.