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 

ASP.NET EvaluationMonitor Datetime format

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



Joined: 02 Nov 2006
Posts: 2

PostPosted: Thu Nov 02, 2006 1:29 pm    Post subject: ASP.NET EvaluationMonitor Datetime format Reply with quote

Hello,

I have been evaluating ILS to add licensing to an ASP.NET app that we are developing, and so far I really like it, but there is a problem when using the EvaluationMonitor class that I could not solve:

1. our ASP.NET app has multiple language support. For now, is localized to Portuguese and US English, and the culture is set by the user or by browser settings

2. if the culture is set to US English, all works fine, but if I change the culture to Portuguese, then suddenly, the license expires

3. after some debugging in VS2005, I found that the FirstUseDate.toShortDateString() returns "11/2/2006", US date format MM/dd/yyyy, and LastUseDate.ToShortDateString() return "2/11/2006", portuguese date format dd/MM/yyyy

4. With those date values, the DaysInUse property return 265 days, when it should return 1

It seems that one date is being localized and the other is being forced to US format.

Is there a way to solve this?

Thanks

Pedro Carvalho
Back to top
View user's profile Send private message
Infralution



Joined: 28 Feb 2005
Posts: 5027

PostPosted: Thu Nov 02, 2006 10:09 pm    Post subject: Reply with quote

Thanks for alerting us to this. There is definitely a bug here. The evaluation date is saved as an encrypted string. The format should be culture independent - however currently it is not. We will fix this ASAP - probably a release by later today.

You could potentially work around the issue by setting the thread culture explicitly before using evaluation monitor eg

Code:
System.Threading.Thread.CurrentThread.CurrentCulture = new System.Globalization.CultureInfo("en-US");


Because you will have potentially saved data in your registry using a different date format you should use EvaluationMonitor.Reset method to clear this data - or just use a different ProductID when creating the EvaluationMonitor.
_________________
Infralution Support
Back to top
View user's profile Send private message Visit poster's website
Infralution



Joined: 28 Feb 2005
Posts: 5027

PostPosted: Fri Nov 03, 2006 4:13 am    Post subject: Reply with quote

We have now released a fix for this problem (V3-3-1 for VS2005 and V3-2-3 for VS2003). You can download the new release from our downloads page.
_________________
Infralution Support
Back to top
View user's profile Send private message Visit poster's website
pedro



Joined: 02 Nov 2006
Posts: 2

PostPosted: Fri Nov 03, 2006 3:51 pm    Post subject: Reply with quote

I actually did that work around right after posting here.

Thanks, I'm going to download the new version anf give it a try

Pedro Carvalho
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