Infralution Support Forum Index Infralution Support
Support groups for Infralution products
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

IsolatedStorageEvaluationMonitor reseting

 
Post new topic   Reply to topic    Infralution Support Forum Index -> Licensing Support
View previous topic :: View next topic  
Author Message
nmunro



Joined: 22 Nov 2009
Posts: 75

PostPosted: Sun May 02, 2010 6:54 am    Post subject: IsolatedStorageEvaluationMonitor reseting Reply with quote

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
View user's profile Send private message
Infralution



Joined: 28 Feb 2005
Posts: 5027

PostPosted: Sun May 02, 2010 11:05 pm    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website
nmunro



Joined: 22 Nov 2009
Posts: 75

PostPosted: Mon May 03, 2010 2:49 am    Post subject: Reply with quote

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
View user's profile Send private message
Infralution



Joined: 28 Feb 2005
Posts: 5027

PostPosted: Mon May 03, 2010 8:11 am    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website
nmunro



Joined: 22 Nov 2009
Posts: 75

PostPosted: Mon May 03, 2010 11:47 am    Post subject: Reply with quote

Sorry, no change to the behavior. A tester for our application also reports the evaluation dialog is stuck on day 1.
Back to top
View user's profile Send private message
Infralution



Joined: 28 Feb 2005
Posts: 5027

PostPosted: Mon May 03, 2010 10:19 pm    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website
nmunro



Joined: 22 Nov 2009
Posts: 75

PostPosted: Mon May 03, 2010 10:42 pm    Post subject: Reply with quote

I'm using the C# code in my project. I'll look into it in more detail this evening. Thanks.
Back to top
View user's profile Send private message
nmunro



Joined: 22 Nov 2009
Posts: 75

PostPosted: Tue May 04, 2010 12:39 am    Post subject: Reply with quote

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
View user's profile Send private message
Infralution



Joined: 28 Feb 2005
Posts: 5027

PostPosted: Tue May 04, 2010 10:36 am    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website
nmunro



Joined: 22 Nov 2009
Posts: 75

PostPosted: Tue May 04, 2010 12:06 pm    Post subject: Reply with quote

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
View user's profile Send private message
Infralution



Joined: 28 Feb 2005
Posts: 5027

PostPosted: Tue May 04, 2010 10:25 pm    Post subject: Reply with quote

I think the fact that your app doesn't have a standard .NET managed entry point (executable) is probably the cause of this problem. See the following thread on MSDN forums for some suggested workarounds if you really want to use IsolatedStorage

http://social.msdn.microsoft.com/forums/en-US/vsx/thread/a64202cd-23cb-47c4-b92c-88e47354dfc9/
_________________
Infralution Support
Back to top
View user's profile Send private message Visit poster's website
nmunro



Joined: 22 Nov 2009
Posts: 75

PostPosted: Tue May 04, 2010 10:43 pm    Post subject: Reply with quote

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
View user's profile Send private message
Infralution



Joined: 28 Feb 2005
Posts: 5027

PostPosted: Tue May 04, 2010 11:21 pm    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website
nmunro



Joined: 22 Nov 2009
Posts: 75

PostPosted: Wed May 05, 2010 12:14 am    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Infralution Support Forum Index -> Licensing Support All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group