Professional UI Solutions
Site Map   /  Register
 
 

Forum

Please Log In to post a new message or reply to an existing one. If you are not registered, please register.

NOTE: Some forums may be read-only if you are not currently subscribed to our technical support services.

Forums » Elegant Ribbon Tech Support » Problem with protectors. Error: "Unable to determine the identity of domain." Collapse All
Subject Author Date
Victor Derevyanko Nov 6, 2008 - 9:39 PM

Hello

I have createad an application with Ribbion interface using Elegant Ribbon. Now, i want to protect it using one of ready protectors. I have tried to use two ones: Net Reactor and Inquartos Obfuscator (sorry: the last one has russian GUI..). Both obfuscators protect exe file of my application from decompilation (using different methods) and embed some code to the assembly to display nag screens at the start of applications. In both cases my protected assembly doesn’t work - the message "System.IO.IsolatedStorage.IsolatedStorageException: Unable to determine the identity of domain." appears. Full text of error is below. I tried to change dirrerent settings of the protectors to workaround this problem, but all my attempts worn’t successfull.

I have tested the problem and found, that this problem appears only in the case of using Elegant Ribbon library in the application. The error appears on the initialization of Elegant Ribbon’s controls:

file "FormMain.designer.cs"
function "InitializeComponent()"
line: this.ribbon1.Id = "f4866b94-2860-4c3e-b622-3238b361d1ad";

In another application, the error appears on the different line:
file: Form1.Designer.cs
function: InitializeComponent()
line: this.ribbon1 = new Elegant.Ui.Ribbon();

So, the question: does anybody know how to workaround this problem? Has anybody protected any application with Ribbon interface with help of any standard protection tools, that modify the startup code of assembly?

Any help will be very appreciated,
Thanks in advance,
Victor Derevyanko


Full text of error:

System.IO.IsolatedStorage.IsolatedStorageException: Unable to determine the identity of domain.

at System.IO.IsolatedStorage.IsolatedStorage._GetAccountingInfo(Evidence evidence, Type evidenceType, IsolatedStorageScope fAssmDomApp, Object& oNormalized)

at System.IO.IsolatedStorage.IsolatedStorage.GetAccountingInfo(Evidence evidence, Type evidenceType, IsolatedStorageScope fAssmDomApp, String& typeName, String& instanceName)

at System.IO.IsolatedStorage.IsolatedStorage._InitStore(IsolatedStorageScope scope, Evidence domainEv, Type domainEvidenceType, Evidence assemEv, Type assemblyEvidenceType, Evidence appEv, Type appEvidenceType)

at System.IO.IsolatedStorage.IsolatedStorage.InitStore(IsolatedStorageScope scope, Type domainEvidenceType, Type assemblyEvidenceType)

at System.IO.IsolatedStorage.IsolatedStorageFile.GetStore(IsolatedStorageScope scope, Type domainEvidenceType, Type assemblyEvidenceType)

at Elegant.Ui.PersistentStateManager.LoadFromIsolatedStorageForDomain()

at Elegant.Ui.IdentityManager.OnObjectIdentityRegistered(String id)

at Elegant.Ui.IdentityManager.RegisterObjectWithIdentity(IObjectWithIdentity objectWithIdentity)

at Elegant.Ui.ControlWithIdentityImplementation.set_Id(String value)

at Elegant.Ui.Control.set_Id(String value)

at SmartMedCab.FormMain.InitializeComponent()

at SmartMedCab.FormMain..ctor()

at SmartMedCab.Program.MainNext()


Victor Derevyanko Nov 12, 2008 - 7:59 PM

You are right - with

PersistentStateManager.LoadStateAutomaticallyFromIsolatedStorageForDomain = false;

the error disappeared.


If you encounter any problems with using Load() and Save() methods, just let us know so we will prepare and send a example to you.
Thanks you, but it’s not necessary. I suspect, this won’t be a big problem to implement such code.


Thank you very much for the help!

Technical Support Nov 12, 2008 - 6:52 AM

We think that the problem has to do with the .NET platform’s method IsolatedStorageFile.GetUserStoreForDomain() that is used in Elegant Ribbon. It throws an exception in your application for some reason. Try and set the PersistentStateManager.LoadStateAutomaticallyFromIsolatedStorageForDomain property to false by inserting the following string before the first use of any of Elegant Ribbon classes(in Program.Main(), for instance):

[STAThread]
                              private static void Main(string[] args)
                              {
                                    PersistentStateManager.LoadStateAutomaticallyFromIsolatedStorageForDomain = false;
                                    new Program().Run(args);
                              }
PersistentManager automatically loads and saves the state in isolated storage. This property set to false disables automatic state loading at application startup. That means that any changes in the quick access toolbar won’t be loaded and saved automatically. If you need these changes to be persistent anyway, you should manually use the Load() and Save() methods of the PersistentManager class. If you encounter any problems with using Load() and Save() methods, just let us know so we will prepare and send a example to you.

Victor Derevyanko Nov 11, 2008 - 4:50 AM

Hello
Today i have received the answer from tech support of Net Reactor. It looks, like the problem is in licensing mechanism of Elegant Ribbon

"Thank you for the test app. I have found the cause of the problem. If
you protect an assembly in application mode the resulting file is not
managed assembly. But the ribbon control requires a managed assembly
to extract the runtime license. To solve the problem please protect
your application in library mode (Quick Settings)."

So, using Elegant Ribbon library applies some restriction on the possibilities of protection of my application. Is there any possibility to workaround/switch off such license checking? I have bought Elegant Ribbon with source codes but I suspect, i have no permission to modify them.

Thanks in advance, V.D