Home Forums WPF controls Xceed DataGrid for WPF Can Xceed DataGrid run in an untrusted sandbox environment?

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • blueteam
    Participant
    Post count: 2
    #44154 |

    I’m currently evaluating the Xceed DataGrid to see if it will work in our application. We are required to work in a “sandbox” appdomain which resides in a hosting process. The sandbox is designed for WPF applications targeting the .NET 4.0 Client Profile.

    I can get the Xceed grid to work fine in a test application on my desktop. But so far I have not been able to get it to run in the sandbox. We are currently trying to use DataGridCollectionViewSource and binding it to a DataTable. I get an exception of type ‘System.Reflection.TargetInvocationException’. It in turn has an inner exception with the following message:

    “Request for the permission of type ‘System.Security.Permissions.SecurityPermission, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089’ failed.”

    This exception occurs in the call to InitializeComponent(), and a further trace is here:

    at Xceed.Wpf.DataGrid.Diagnostics.DataGridTraceSource.ShouldTrace(TraceEventType eventType)
    at Xceed.Wpf.DataGrid.CustomItemContainerGenerator.TraceEvent(TraceEventType eventType, DataGridTraceEventId eventId, String message, DataGridTraceArg[] args)
    at Xceed.Wpf.DataGrid.CustomItemContainerGenerator.UpdateHeaders(IList headers)
    at Xceed.Wpf.DataGrid.CustomItemContainerGenerator.ResetNodeList()
    at Xceed.Wpf.DataGrid.CustomItemContainerGenerator..ctor(DataGridControl dataGridControl, CollectionView collectionView, DataGridContext dataGridContext, CustomItemContainerGeneratorRecyclingPools recyclingPools, BubbleDirtyFlag ensureNodeTreeCreatedRequiredFlag, InheritAutoResetFlag handleGlobalItemResetFlag, LeveledAutoResetFlag deferDetailsRemapFlag)
    at Xceed.Wpf.DataGrid.CustomItemContainerGenerator.CreateGenerator(DataGridControl dataGridControl, CollectionView collectionView, DataGridContext dataGridContext)
    at Xceed.Wpf.DataGrid.DataGridControl..ctor()

    So… I looked into the permissions offered to us in our sandbox, and here they are:
     UIPermission – Unrestricted =”true”
     SecurityPermission – Flags=”Execution, ControlThread”
     FileIOPermission – PathDiscovery=”*AllFiles*”
     MediaPermission – Audio=”NoAudio” Video=”NoVideo” Image=Safe Image”
     IsolatedStorageFilePermission – Allowed=AssemblyIsolationByUser”
    UserQuota=”2048000”

    And as you can probably guess, we don’t control these permissions. We take them as given. So my question is, do you think these sandbox permissions (such as “SecurityPermission”) might be our problem and if so, are there ways to configure the grid to work with them? Or perhaps I’m making some other mistake?

    Thanks in advance for any help you can provide…

    blueteam
    Participant
    Post count: 2

    FYI, it looks like another developer encountered the same problem with another vendor’s WPF controls, and they were able to solve the problem:

    https://www.devexpress.com/Support/Center/Question/Details/Q456719

    Any chance that your team can have a look at this?

    Thanks…

    Fawzi [Xceed]
    Member
    Post count: 722

    Hi,

    Unfortunately, the DataGrid requires full trust to run normally. If not, certain features become non functional (e.g. printing), and we have decided not to manage these exceptions.

    However, if you can provide us a bit more details on your setup, or a sample app reproducing your environment, we could evaluate if we could change this approach, of course knowing that these features would not be available. You may send your sample project to: support@xceed.com

Viewing 3 posts - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.