Ticket T296849
Visible to All Users

ArgumentNullException can occur when DevExpress.ExpressApp.Security.Adapters.IsGrantedAdapter.Enable is used

created 9 years ago

[DevExpress Support Team: CLONED FROM T285117: NonPersistentObjectSpace - Support showing persistent objects in non-persistent objects' views]
Hi Dennis,
I found the problem. Problem occurs when the following code activated;
DevExpress.ExpressApp.Security.Adapters.IsGrantedAdapter.Enable(DevExpress.ExpressApp.Security.Adapters.ReloadPermissionStrategy.OnLogon);

I faced same problem but i cant find a way to resolve;
The error occurred:
Type:       ArgumentNullException
Message:    Değer null olamaz.
Parametre adı: objectKeyAsString
Data:       0 entries
Stack trace:
  konum: DevExpress.Utils.Guard.ThrowArgumentNullException(String propName)
  konum: DevExpress.Utils.Guard.ArgumentNotNull(Object value, String name)
  konum: DevExpress.ExpressApp.Utils.Guard.ArgumentNotNull(Object argumentValue, String argumentName)
  konum: DevExpress.ExpressApp.ObjectHandleHelper.CreateObjectHandle(ITypesInfo typesInfo, Type objectType, String objectKeyAsString)
  konum: DevExpress.ExpressApp.BaseObjectSpace.GetObjectHandle(Object obj)
  konum: DevExpress.ExpressApp.Security.Adapters.IsGrantedAdapter.GetRequestHashCode(Type objectType, Object targetObject, String memberName, String operation, IObjectSpace clientObjectSpace)
  konum: DevExpress.ExpressApp.Security.Adapters.IsGrantedAdapter.IsGranted(Type objectType, Object targetObject, String memberName, String operation, IObjectSpace clientObjectSpace, Boolean& result)
  konum: DevExpress.ExpressApp.Security.Adapters.IsGrantedAdapter.DataManipulationRight_CustomHasPermissionTo(Object sender, CustomHasPermissionToEventArgs e)
  konum: DevExpress.ExpressApp.SecuritySystem.IsGranted(IPermissionRequest permissionRequest)
  konum: DevExpress.ExpressApp.DataManipulationRight.HasPermissionTo(Type objectType, String memberName, Object targetObject, IObjectSpace objectSpace, String operation)
  konum: DevExpress.ExpressApp.DataManipulationRight.CanRead(Type objectType, String propertyName, Object targetObject, CollectionSourceBase collectionSource, IObjectSpace objectSpace)
  konum: DevExpress.ExpressApp.SystemModule.ListViewControllerBase.CanRead(Object targetObject, String memberName, CollectionSourceBase collectionSource)
  konum: DevExpress.ExpressApp.Web.SystemModule.ASPxGridListEditorMemberLevelSecurityController.Grid_CustomColumnDisplayText(Object sender, ASPxGridViewColumnDisplayTextEventArgs e)
  konum: DevExpress.Web.ASPxGridViewColumnDisplayTextEventHandler.Invoke(Object sender, ASPxGridViewColumnDisplayTextEventArgs e)
  konum: DevExpress.Web.ASPxGridView.RaiseCustomColumnDisplayText(ASPxGridColumnDisplayTextEventArgs e)
  konum: DevExpress.Web.Internal.GridTextBuilder.GetDisplayControlArgsCore(IWebGridDataColumn column, Int32 visibleIndex, IValueProvider provider, ASPxGridBase grid, Object value)
  konum: DevExpress.Web.Internal.GridTextBuilder.GetDisplayControlArgs(IWebGridDataColumn column, Int32 visibleIndex, IValueProvider provider, ASPxGridBase grid, Boolean highlightSearchText)
  konum: DevExpress.Web.Internal.GridRenderHelper.CreateDataCellDisplayControl(IWebGridDataColumn column, Int32 visibleIndex, IValueProvider row)
  konum: DevExpress.Web.Internal.GridRenderHelper.AddDisplayControlToDataCell(Control cell, IWebGridDataColumn column, Int32 visibleIndex, IValueProvider row)
  konum: DevExpress.Web.Rendering.GridViewTableDataCell.CreateControlHierarchy()
  konum: DevExpress.Web.Internal.InternalTableCell.CreateChildControls()
  konum: System.Web.UI.Control.EnsureChildControls()
  konum: DevExpress.Web.Internal.InternalTableCell.DevExpress.Web.Internal.IASPxWebControl.EnsureChildControls()
  konum: DevExpress.Web.Internal.RenderUtils.EnsureChildControlsRecursive(Control control, Predicate`1 skipControlCondition)
  konum: DevExpress.Web.Internal.RenderUtils.EnsureChildControlsRecursive(Control control, Predicate`1 skipControlCondition)
  konum: DevExpress.Web.Internal.RenderUtils.EnsureChildControlsRecursive(Control control, Predicate`1 skipControlCondition)
  konum: DevExpress.Web.Internal.RenderUtils.EnsureChildControlsRecursive(Control control, Predicate`1 skipControlCondition)
  konum: DevExpress.Web.Internal.RenderUtils.EnsureChildControlsRecursive(Control control, Boolean skipContentContainers)
  konum: DevExpress.Web.ASPxWebControlBase.EnsureChildControlsRecursive(Control control, Boolean skipContentContainers)
  konum: DevExpress.Web.ASPxWebControlBase.EnsureChildControlsRecursive(Control control)
  konum: DevExpress.Web.ASPxWebControlBase.CreateChildControls()
  konum: System.Web.UI.Control.EnsureChildControls()
  konum: DevExpress.Web.ASPxWebControlBase.EnsureChildControls()
  konum: DevExpress.Web.ASPxWebControlBase.DevExpress.Web.Internal.IASPxWebControl.EnsureChildControls()
  konum: DevExpress.Web.Internal.RenderUtils.EnsureChildControlsRecursive(Control control, Predicate`1 skipControlCondition)
  konum: DevExpress.Web.Internal.RenderUtils.EnsureChildControlsRecursive(Control control, Predicate`1 skipControlCondition)
  konum: DevExpress.Web.Internal.RenderUtils.EnsureChildControlsRecursive(Control control, Predicate`1 skipControlCondition)
  konum: DevExpress.Web.Internal.RenderUtils.EnsureChildControlsRecursive(Control control, Predicate`1 skipControlCondition)
  konum: DevExpress.Web.Internal.RenderUtils.EnsureChildControlsRecursive(Control control, Predicate`1 skipControlCondition)
  konum: DevExpress.Web.Internal.RenderUtils.EnsureChildControlsRecursive(Control control, Boolean skipContentContainers)
  konum: DevExpress.Web.ASPxWebControlBase.EnsureChildControlsRecursive(Control control, Boolean skipContentContainers)
  konum: DevExpress.Web.ASPxWebControlBase.EnsureChildControlsRecursive(Control control)
  konum: DevExpress.Web.ASPxWebControlBase.CreateChildControls()
  konum: DevExpress.Web.ASPxWebControl.CreateChildControls()
  konum: System.Web.UI.Control.EnsureChildControls()
  konum: DevExpress.Web.ASPxWebControlBase.EnsureChildControls()
  konum: DevExpress.Web.ASPxGridBase.Render(HtmlTextWriter writer)
  konum: System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter)
  konum: System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter)
  konum: System.Web.UI.Control.RenderControl(HtmlTextWriter writer)
  konum: System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children)
  konum: System.Web.UI.Control.RenderChildren(HtmlTextWriter writer)
  konum: System.Web.UI.WebControls.WebControl.RenderContents(HtmlTextWriter writer)
  konum: System.Web.UI.WebControls.WebControl.Render(HtmlTextWriter writer)
  konum: System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter)
  konum: System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter)
  konum: System.Web.UI.Control.RenderControl(HtmlTextWriter writer)
  konum: System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children)
  konum: System.Web.UI.Control.RenderChildren(HtmlTextWriter writer)
  konum: System.Web.UI.WebControls.WebControl.RenderContents(HtmlTextWriter writer)
  konum: System.Web.UI.WebControls.WebControl.Render(HtmlTextWriter writer)
  konum: System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter)
  konum: System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter)
  konum: System.Web.UI.Control.RenderControl(HtmlTextWriter writer)
  konum: System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children)
  konum: System.Web.UI.Control.RenderChildren(HtmlTextWriter writer)
  konum: System.Web.UI.Control.Render(HtmlTextWriter writer)
  konum: System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter)
  konum: System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter)
  konum: System.Web.UI.Control.RenderControl(HtmlTextWriter writer)
  konum: DevExpress.ExpressApp.Web.Templates.XafCallbackManager.GetCompactRenderResult(Control control)
  konum: DevExpress.ExpressApp.Web.Templates.XafCallbackManager.GetControlChildrenRenderResult(Control control)
  konum: DevExpress.ExpressApp.Web.Templates.XafCallbackManager.ProcessUpdatePanel(String cpControlsToUpdate, XafUpdatePanel updatePanel)
  konum: DevExpress.ExpressApp.Web.Templates.XafCallbackManager.callbackControl_Callback(Object source, CallbackEventArgs e)
  konum: DevExpress.Web.ASPxCallback.OnCallback(CallbackEventArgs e)
  konum: DevExpress.Web.ASPxCallback.RaiseCallbackEvent(String eventArgument)
  konum: DevExpress.Web.ASPxWebControl.System.Web.UI.ICallbackEventHandler.RaiseCallbackEvent(String eventArgument)
InnerException is null

Comments (1)
DevExpress Support Team 9 years ago

    Hello Volkan,
    My attempts to reproduce this issue using information from NonPersistentObjectSpace - Support showing persistent objects in non-persistent objects' views and Security - Provide a way to adjust UI according to the permission changes done through the application UI or directly in the database were unsuccessful. It seems that the issue is related to your specific configuration, or this issue is already fixed in version 15.1.7.
    Please update to the latest version and send us a small sample project if this issue is still reproducible. We will be happy to help you.
    Also please clarify when you installed a trial version.

    Disclaimer: The information provided on DevExpress.com and affiliated web properties (including the DevExpress Support Center) is provided "as is" without warranty of any kind. Developer Express Inc disclaims all warranties, either express or implied, including the warranties of merchantability and fitness for a particular purpose. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.

    Confidential Information: Developer Express Inc does not wish to receive, will not act to procure, nor will it solicit, confidential or proprietary materials and information from you through the DevExpress Support Center or its web properties. Any and all materials or information divulged during chats, email communications, online discussions, Support Center tickets, or made available to Developer Express Inc in any manner will be deemed NOT to be confidential by Developer Express Inc. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.