View previous topic :: View next topic |
Author |
Message |
pedro
Joined: 02 Nov 2006 Posts: 2
|
Posted: Thu Nov 02, 2006 1:29 pm Post subject: ASP.NET EvaluationMonitor Datetime format |
|
|
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 |
|
|
Infralution
Joined: 28 Feb 2005 Posts: 5027
|
Posted: Thu Nov 02, 2006 10:09 pm Post subject: |
|
|
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 |
|
|
Infralution
Joined: 28 Feb 2005 Posts: 5027
|
Posted: Fri Nov 03, 2006 4:13 am Post subject: |
|
|
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 |
|
|
pedro
Joined: 02 Nov 2006 Posts: 2
|
Posted: Fri Nov 03, 2006 3:51 pm Post subject: |
|
|
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 |
|
|
|