Error deleting element
I have a custom module using OpenAccess and when I try to delete an entity I get the following error:
Invalid parameter Name
Parameter name: paramName
at Telerik.Microsoft.Practices.Unity.InterceptionExtension.ParameterCollection.IndexForInputParameterName(String paramName)
at Telerik.Microsoft.Practices.Unity.InterceptionExtension.ParameterCollection.get_Item(String parameterName)
at Telerik.Sitefinity.Security.AuthorizationPermissionProvider.AuthorizeInput(IMethodInvocation input)
at Telerik.Sitefinity.Security.SitefinityAuthorizationCallHandler.Invoke(IMethodInvocation input, GetNextHandlerDelegate getNext)
at Telerik.Microsoft.Practices.Unity.InterceptionExtension.HandlerPipeline.Invoke(IMethodInvocation input, InvokeHandlerDelegate target)
at Telerik.Microsoft.Practices.Unity.InterceptionExtension.PolicyInjectionBehavior.Invoke(IMethodInvocation input, GetNextInterceptionBehaviorDelegate getNext)
at Telerik.Microsoft.Practices.Unity.InterceptionExtension.InterceptionBehaviorPipeline.Invoke(IMethodInvocation input, InvokeInterceptionBehaviorDelegate target)
at DynamicModule.ns.Wrapped_OpenAccessProvider_0b89c35fd5a849edad2f6201e1d9e5a3.DeleteGroup(AdvertisementGroup group)
at Modules.Advertisements.Data.AdvertisementsManager.DeleteGroup(Guid id) in AdvertisementsManager.cs:line 226
at Modules.Advertisements.Web.UI.BackendAdvertisementsControl.DeleteGroup(Guid groupId) in BackendAdvertisementsControl.cs:line 1221
at Modules.Advertisements.Web.UI.BackendAdvertisementsControl.OnAdGroupGridItemCommand(Object sender, GridCommandEventArgs e) in BackendAdvertisementsControl.cs:line 652
The entity does not inherit from content item. It's just a plain entity.
Hi Brian Crosby,
This is a very strange error, could you send us the code for your custom module so we could reproduce the problem locally?
Kind regards,Thank you for being the most amazing .NET community! Your unfailing support is what helps us charge forward! We'd appreciate your vote for Telerik in this year's DevProConnections Awards. We are competing in mind-blowing 20 categories and every vote counts! VOTE for Telerik NOW >>
What was the solution to this problem? I am getting the exact same issue, but, related to a class that does inherit from the content class. It seems to only occur when attempting to delete the master item, and I do not get the error when I try to delete a temp item.
I don't remember for sure what the fix was. But I think it might have been an attribute. Try removing any attributes you have on your method and see if that fixes your problem. Sorry I couldn't be more help.
Cheers,
Brian
I fixed this issue after hearing back from Support. Basically, I just had to do a find/replace on the word "product" for the word "partner" (in this case, I based my module on the product module and my module is for "Partners"). Support specifically pointed me to the ParameterPermission Attribute that I decorated my DeletePartner method with, which I had defined as so:
[ParameterPermission(
"partner"
, PartnersConstants.Security.PermissionSetName, PartnersConstants.Security.Delete)]
public
abstract
void
DeletePartner(PartnerItem partner);
public
override
void
DeletePartner(PartnerItem product)
public
override
void
DeletePartner(PartnerItem partner)