View previous topic :: View next topic |
Author |
Message |
nmunro
Joined: 22 Nov 2009 Posts: 75
|
Posted: Sun May 02, 2010 6:54 am Post subject: IsolatedStorageEvaluationMonitor reseting |
|
|
Every time I call the following:
EvaluationMonitor evaluationMonitor = new IsolatedStorageEvaluationMonitor(Support.APP_INF_STORE, false, true);
(where Support.APP_INF_STORE is a string constant)
the returned evaluationMonitor is a brand new one (_firstUseDate is reset to a new value). Obviously this is not the expected behavior.
Replacing IsolatedStorageEvaluationMonitor with RegistryEvaluationMonitor results in the expected behavior, the _firstUseDate does not change after the first call.
What might I be doing wrong?
Using ILS 4.7
Thanks. |
|
Back to top |
|
|
Infralution
Joined: 28 Feb 2005 Posts: 5027
|
Posted: Sun May 02, 2010 11:05 pm Post subject: |
|
|
I'm not able to replicate this. Can you provide the following information:
Operating System
Operating System and User locale (eg French OS, Fr-fr locale)
User Type (Admin, Power, Limited)
.NET Framework Version
Application type (eg Windows Forms, WPF, Web App)
Does usage count increment each time you run or is it unchanged? If you change the simple Licensed App sample project to use IsolatedStorage does it exhibit the same behaviour? _________________ Infralution Support |
|
Back to top |
|
|
nmunro
Joined: 22 Nov 2009 Posts: 75
|
Posted: Mon May 03, 2010 2:49 am Post subject: |
|
|
Vista x64 SP2
En-us
Administrator
.NET 2.0
Windows forms application
The usage count is 1 every time.
The simple lic app works correctly with an IsolatedStorageEvaluationMonitor.
I have upgraded ILS a couple of times lately and the original data may have been generated in an earlier version.
Strange indeed. |
|
Back to top |
|
|
Infralution
Joined: 28 Feb 2005 Posts: 5027
|
Posted: Mon May 03, 2010 8:11 am Post subject: |
|
|
The only thing I can think might cause this is if your string constant is not a valid filename. Try changing it to the same string as is used in the sample project and see if this works. _________________ Infralution Support |
|
Back to top |
|
|
nmunro
Joined: 22 Nov 2009 Posts: 75
|
Posted: Mon May 03, 2010 11:47 am Post subject: |
|
|
Sorry, no change to the behavior. A tester for our application also reports the evaluation dialog is stuck on day 1. |
|
Back to top |
|
|
Infralution
Joined: 28 Feb 2005 Posts: 5027
|
Posted: Mon May 03, 2010 10:19 pm Post subject: |
|
|
Are you using the source code in your application? If so which language (C# or VB.NET)?
If you can replicate the bug in a project then email a zipped copy to support@infralution.com that would help us track down the issue for you. _________________ Infralution Support |
|
Back to top |
|
|
nmunro
Joined: 22 Nov 2009 Posts: 75
|
Posted: Mon May 03, 2010 10:42 pm Post subject: |
|
|
I'm using the C# code in my project. I'll look into it in more detail this evening. Thanks. |
|
Back to top |
|
|
nmunro
Joined: 22 Nov 2009 Posts: 75
|
Posted: Tue May 04, 2010 12:39 am Post subject: |
|
|
Please find below details on where the exception is being thrown. I'm passing the hard coded value of "MyEvaluationPassword" for the file name parameter.
Last edited by nmunro on Wed May 05, 2010 2:16 pm; edited 1 time in total |
|
Back to top |
|
|
Infralution
Joined: 28 Feb 2005 Posts: 5027
|
Posted: Tue May 04, 2010 10:36 am Post subject: |
|
|
A web search on the error message you are getting turns up mostly cases where the entry point of the application is an unmanaged app and they are building managed plugins for things like the Visual Studio IDE.
Is your application doing anything unusual with AppDomains or the way it starts? Are you using some form of obfuscator or code protector product which may be changing the way the application is started? _________________ Infralution Support |
|
Back to top |
|
|
nmunro
Joined: 22 Nov 2009 Posts: 75
|
Posted: Tue May 04, 2010 12:06 pm Post subject: |
|
|
The app is a dll, an add in to commercial software. The end product is obfuscated, but the exception occurs in the unobfuscated code as well. There is no unmanaged code in our application. We can live with the registry monitor, but it seems strange that the isolated storage would not work. Thanks. |
|
Back to top |
|
|
Infralution
Joined: 28 Feb 2005 Posts: 5027
|
|
Back to top |
|
|
nmunro
Joined: 22 Nov 2009 Posts: 75
|
Posted: Tue May 04, 2010 10:43 pm Post subject: |
|
|
Thanks, I'll have a look. Our previous licensing tool used Isolated storage so I'm not completely convinced. As an add-in we have to conform to a specific method to be included. No worries, as the Registry method will be sufficient for our needs. Thanks for your help. |
|
Back to top |
|
|
Infralution
Joined: 28 Feb 2005 Posts: 5027
|
Posted: Tue May 04, 2010 11:21 pm Post subject: |
|
|
The isolated storage monitor uses the following code to get the Isolated Storage (in ReadData):
Code: | _isoStore = IsolatedStorageFile.GetMachineStoreForDomain(); |
Since you are using the code you could also experiment with using GetMachineStoreForApplication() or GetMachineStoreForAssembly instead. I think that the only issue with these is that when you release a new assembly/application version you will get a different (new) isolated storage. _________________ Infralution Support |
|
Back to top |
|
|
nmunro
Joined: 22 Nov 2009 Posts: 75
|
Posted: Wed May 05, 2010 12:14 am Post subject: |
|
|
That might work, I'll give it a go and will report back.
It appears that GetMachineStoreForAssembly will work for us. Thanks for the pointer. |
|
Back to top |
|
|
|