More in this section

Forums / Developing with Sitefinity / Error Message in PermissionView

Error Message in PermissionView

2 posts, 0 answered
  1. Garry
    Garry avatar
    52 posts
    Registered:
    04 Nov 2010
    20 May 2009
    Link to this post
    I have implemented the Permission View used in the Contacts36 sample in my own module to play around with module permissions. Everything appears to function properly, but when the PermissionSet is updated I get the following error.

    Is my class type name to long or something?

    Server Error in '/KCDC' Application.  
    --------------------------------------------------------------------------------  
     
    Value for property ItemType is too long. Maximun length is 64   
    Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.   
     
    Exception Details: Nolics.ORMapper.Base.LengthException: Value for property ItemType is too long. Maximun length is 64  
     
    Source Error:   
     
    An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.    
     
    Stack Trace:   
     
     
    [LengthException: Value for property ItemType is too long. Maximun length is 64]  
       Telerik.Security.Data.Permission.nn_verifyData() +592  
       Telerik.Security.Data.Permission.Nolics.ORMapper.Base.IOdbClass.BeginCommit() +57  
       Nolics.ORMapper.Base.Transaction.Commit(Boolean fCleanIfSuccess) +1418  
       Nolics.ORMapper.Base.Transaction.Commit() +34  
       Telerik.Security.Data.DefaultSecurityProvider.SetPermissions(ISecured securedObject, Int32 grant, Int32 deny, String roleProvider, String[] roles) +833  
       Telerik.Security.SecurityManager.SetPermissions(ISecured securedObject, Int32 grant, Int32 deny, String roleProvider, String[] roles) +73  
       Telerik.Security.Permissions.SecuredBase.SetPermissions(Int32 grant, Int32 deny, String roleProvider, String[] roles) +75  
       Telerik.Security.WebControls.PermissionSet.button_Command(Object sender, CommandEventArgs e) +968  
       System.Web.UI.WebControls.LinkButton.OnCommand(CommandEventArgs e) +108  
       System.Web.UI.WebControls.LinkButton.RaisePostBackEvent(String eventArgument) +135  
       System.Web.UI.WebControls.LinkButton.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +10  
       System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +13  
       System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +175  
       System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1565  
     
       
     
     
    --------------------------------------------------------------------------------  
    Version Information: Microsoft .NET Framework Version:2.0.50727.3074; ASP.NET Version:2.0.50727.3074   
  2. Vlad
    Vlad avatar
    498 posts
    Registered:
    19 Jun 2017
    21 May 2009
    Link to this post
    Hi Garry,

    Seems there is a size limitation of the ItemType property of the Telerik.Security.Data.Permission class. However, there is no reason for such limitation, so this is a bug. We will fix it for the next release.

    For the time being, we can suggest you one of the two approaches:

    1. Make the string that represent the object type shorter:
       - If your secured object implements ISecuredObject interface or inherits SecuredBase abstract class, you can override its ObjectType property to return a unique string with length < 64. The default implementation of SecuredBase.ObjectType property is:
            public virtual string ObjectType 
            { 
                get { return this.GetType().FullName; } 
            } 
     
       - Otherwise (in case your secured object implements ISecured interface), you have to change the name or the namespace of your ISecured class, so the length of its type full name will be shorter than 64.

    2. We can send you a custom (latest) build of the security data provider with the fix. Please open a new support ticket for that.

    We have updated you telerik points for reporting this issue.

    Best wishes,
    Vlad
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Check out the tips for optimizing your support resource searches.
2 posts, 0 answered