We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy.
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Why Unauthorised exception when adding a filter to GridGroupingControl

The “Unauthorized exception may be occurred due to application being used inside protected folder. Because for every loading and saving of compare operator will be referred within the application folder (bin directory).

In order to resolve this we have implemented the API OperatorStoreDirectory for giving CompareOperatorStore.dat file path as we like. This property gets or sets the location of the CompareOperatorStore.dat file location. The following two things should be ensured while using this.

  1. The path should be assigned before the filter is wired.
  2. If you want to store the CompareOperatorStore.dat in your needed folder, you have to give the path as <Location>\\<Folder_Name>\\. So that please make use of below code,

C#

VB

 

Article ID: Published Date: Last Revised Date: Platform: Control:
5928 01/03/2016 02/08/2017 Windows Forms GridGroupingControl
Did you find this information helpful?
Comments
Giorgio Bernardi Feb 08, 2016
That's foolish! Why do you need to save something to file system? Can you explain? Is there a way to disable this behavior? Usually apps are installed in \program files\ folder and this is a read-only folder for most of the users.
Reply
Not Known Feb 10, 2016
Hi Giorgio, By default, CompareOperatorStore.dat will be automatically created whenever filtering is performed in application. Suppose, if the application running is in protected folder, CompareOperatorStore.dat file couldn’t be written on that protected folder. In that case, Unauthorized exception will occurs. So that, we have provided an alternate solution for this case by redirecting to another folder by using a property OperatorStoreDirectory . Regards, Amal Raj U
Giorgio Bernardi Mar 02, 2016
You have'nt answered the question: why do you need to create a file? The second point is, as I have written before: installing an app inside c:\program files\ is "normal" and the fact that this folder is "read only" is "normal", so you have to explain why you not write inside a temp folder by default. E.g: private GridDynamicFilter filter = new GridDynamicFilter(); filter.OperatorStoreDirectory = System.IO.Path.GetTempPath() + "\\"; and create a random file name. Thanks Giorgio
Reply
Mohanraj Gunasekaran [Syncfusion] Mar 15, 2016
Hi Giorgio, We have implemented a new method(SaveCompareOperatorStream) which will maintain CompareOperatorStore.dat file internally. So the external .dat file won't be generated in application folder. This implementation will be included in our upcoming release(Vol1 2016) and old method(SaveCompareOperator) has marked as obsolete. If you want you can use either method. Regards, Mohanraj G
Reply
Ruben Edna Apr 19, 2016
Hello. We just upgraded from a 2011 version of Syncfusion for WinForms to version 13.4400.0.63, and started getting this error upon calling gridDynamicFilter.WireGrid(gridGroupingControl_Example); This method worked in our old version and is pretty critical to many of our customers. I see you have created a new method (SaveCompareOperatorStream) which is not creating a file, I wonder if you are now using this method in your embedded methods like gridDynamicFilter.WireGrid as well, or if I have to do modifications to the method call above to aviod saving to file?
Reply
Amresh Soundhra Pandiyan [Syncfusion] Apr 19, 2016
Hi Ruben, We have implemented the method, SaveCompareOperatorStream() in our latest version (i.e. 14.1.0.41). No such modifications are needed to avoid the file being saved. Please upgrade your product version to avail this support. Regards, Amresh S.
Add Comment
You must log in to leave a comment

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon