Page Index Toggle Pages: 1 Send TopicPrint
Hot Topic (More than 10 Replies) Software reverts to trial version (Read 5393 times)
David Long
Full Member
***
Offline


I love YaBB 1G - SP1!

Posts: 125
Location: England
Joined: Oct 23rd, 2006
Software reverts to trial version
Jun 12th, 2020 at 8:44am
Print Post  
We have had a query from a customer saying that their software reverts to a trial version at some point and they have to close and re-open the software to fix the problem.  Any ideas why this should happen?  The text from their email is as follows:

Regarding our software, since the last update (I think) the software, after being open for a period of time, seems to revert to a Trail Version type mode where all my box text is replaced by “Trail Version”… I have to close and re-open file to restore. Also, in the upper left of the HTA window there is the text “MindFusion.Diagramming for Windows Forms, trial version” – this is present from the time I open to the file to when it eventually switches to Trial mode.. suggestions on how to rectify this?




  

image002.png ( 2 KB | 119 Downloads )
image002.png
Back to top
 
IP Logged
 
Slavcho
YaBB Moderator
*****
Offline


tech.support

Posts: 3153
Joined: Oct 19th, 2005
Re: Software reverts to trial version
Reply #1 - Jun 12th, 2020 at 10:00am
Print Post  
Have you set the DiagramView.LicenseKey property? If you've upgraded at some point, make sure you use the latest key you receive with upgrade.

Regards,
Slavcho
Mindfusion
  
Back to top
 
IP Logged
 
David Long
Full Member
***
Offline


I love YaBB 1G - SP1!

Posts: 125
Location: England
Joined: Oct 23rd, 2006
Re: Software reverts to trial version
Reply #2 - Jun 12th, 2020 at 10:23am
Print Post  
Interestingly, we have never set this.  We have not upgraded for some time and are using version 6.4.1 of Diagramming for WinForms and we just have the line...

MindFusion.Licensing.LicenseManager.AddLicense("AQAAADkAAA.......

in our Main(string[] args) function.  This has been working for years!

DavidL
  
Back to top
 
IP Logged
 
Slavcho
YaBB Moderator
*****
Offline


tech.support

Posts: 3153
Joined: Oct 19th, 2005
Re: Software reverts to trial version
Reply #3 - Jun 12th, 2020 at 10:45am
Print Post  
That should work the same as the LicenseKey property. Make sure it's the very latest key you've received with last upgrade then. Any chance your customers tried to upgrade to new version themselves, if yours is a bespoke software? The control does not show trial texts for some minutes / number of objects because people often requested nag-free time for their demos... So it's also possible the customer just now started creating larger diagrams.

To avoid shipping with an old key, maybe add something like this to your release tests:
MindFusion.Licensing.LicenseManager.CheckLicense(...) == MindFusion.Licensing.KeyValidity.Valid;
  
Back to top
 
IP Logged
 
David Long
Full Member
***
Offline


I love YaBB 1G - SP1!

Posts: 125
Location: England
Joined: Oct 23rd, 2006
Re: Software reverts to trial version
Reply #4 - Jun 12th, 2020 at 11:45am
Print Post  
Could you give me some assistance with the two parameters required in CheckLicense().  There seems to be nothing the the help file.

DavidL
  
Back to top
 
IP Logged
 
Slavcho
YaBB Moderator
*****
Offline


tech.support

Posts: 3153
Joined: Oct 19th, 2005
Re: Software reverts to trial version
Reply #5 - Jun 12th, 2020 at 12:46pm
Print Post  
Try something like this (should return Valid only after AddLicense call) -

LicenseManager.CheckLicense(
    releaseDate.ToDateTime(), "MindFusion.Diagramming.WinForms");

releaseDate is when this specific build was released, e.g. 6/6/2016 for v6.4.1 -
https://mindfusion.eu/Forum/YaBB.pl?num=1465206534
  
Back to top
 
IP Logged
 
David Long
Full Member
***
Offline


I love YaBB 1G - SP1!

Posts: 125
Location: England
Joined: Oct 23rd, 2006
Re: Software reverts to trial version
Reply #6 - Jun 18th, 2020 at 1:58pm
Print Post  
All our files are dated 5th June 2016.  Is this the correct date to use?  I ask because one of our clients has code with a licence check in as follows:

MindFusion.Licensing.LicenseManager.AddLicense("AQAA.....");

            if (MindFusion.Licensing.LicenseManager.CheckLicense(new DateTime(2016, 6, 6), "MindFusion.Diagramming.WinForms") != MindFusion.Licensing.KeyValidity.Valid)
            {
                MessageBox.Show(Resources.String_MindFusionNotLicensed, Resources.String_HFRMError);
            }

and the check has been triggered.

DavidL
  
Back to top
 
IP Logged
 
Slavcho
YaBB Moderator
*****
Offline


tech.support

Posts: 3153
Joined: Oct 19th, 2005
Re: Software reverts to trial version
Reply #7 - Jun 18th, 2020 at 3:33pm
Print Post  
We had a military customer where license keys did not work due to registry settings applied on all their systems to disable .NET's insecure cryptographics algorithms. We ended up implementing our own SHA coding to work around that some years ago, but if your version is older than that, it could be the same problem. Try running with latest license assembly attached here to see if it fixes that, you might have to remap the version numbers -
https://docs.microsoft.com/en-us/dotnet/framework/configure-apps/redirect-assemb...

If it does not help, maybe check if there aren't newer versions of the diagram installed by a different software and somehow ending up loaded by yours from GAC or AssemblyFoldersEx locations, not sure if that can happen. With new assembly you could also call LicenseManager.EnableLogging("log.txt") and see if the log shows any exceptions.

Regards,
Slavcho
  

MindFusion_Licensing.zip ( 27 KB | 185 Downloads )
Back to top
 
IP Logged
 
David Long
Full Member
***
Offline


I love YaBB 1G - SP1!

Posts: 125
Location: England
Joined: Oct 23rd, 2006
Re: Software reverts to trial version
Reply #8 - Jun 18th, 2020 at 9:16pm
Print Post  
The customer is a military one, so your first idea sounds correct. I have added the following to app.config

<dependentAssembly>
    <assemblyIdentity name="MindFusion.Licensing.dll"
      publicKeyToken="9d02e21d957ddaef"
      culture="Neutral" />
    <bindingRedirect oldVersion="1.0.1.24632" newVersion="1.0.4.38034"/>
  </dependentAssembly>

but I get the error:

Message               : Could not load file or assembly 'MindFusion.Licensing, Version=1.0.1.24632, Culture=neutral, PublicKeyToken=9d02e21d957ddaef' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)
Source                : MindFusion.Diagramming.WinForms
Stack Trace           :
   at MindFusion.Diagramming.WinForms.DiagramView.set_LicenseKey(String value)
   at HierarchicalTaskAnalysis.HTAForm.InitializeComponent()

Any ideas?

DavidL
  
Back to top
 
IP Logged
 
Slavcho
YaBB Moderator
*****
Offline


tech.support

Posts: 3153
Joined: Oct 19th, 2005
Re: Software reverts to trial version
Reply #9 - Jun 19th, 2020 at 8:42am
Print Post  
Demo.exe.config =

Code
Select All
<configuration>
  <runtime>
    <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
      <dependentAssembly>
        <assemblyIdentity name="MindFusion.Licensing"
            publicKeyToken="9d02e21d957ddaef" culture="Neutral" />
        <bindingRedirect oldVersion="1.0.1.24632" newVersion="1.0.4.38034" />
      </dependentAssembly>
    </assemblyBinding>
  </runtime>
</configuration>
 



worked for me with v6.4.1 demo. Adding .dll extension seems to break that.

Regards,
Slavcho
  
Back to top
 
IP Logged
 
David Long
Full Member
***
Offline


I love YaBB 1G - SP1!

Posts: 125
Location: England
Joined: Oct 23rd, 2006
Re: Software reverts to trial version
Reply #10 - Jun 19th, 2020 at 1:09pm
Print Post  
Sorry, but that does not seem to work either.  I think that it's best to upgrade to the latest version of the software as our version is four years old.

DavidL
  
Back to top
 
IP Logged
 
Slavcho
YaBB Moderator
*****
Offline


tech.support

Posts: 3153
Joined: Oct 19th, 2005
Re: Software reverts to trial version
Reply #11 - Jun 19th, 2020 at 1:23pm
Print Post  
Is it remapping the version number not working, or CheckLicence?
  
Back to top
 
IP Logged
 
David Long
Full Member
***
Offline


I love YaBB 1G - SP1!

Posts: 125
Location: England
Joined: Oct 23rd, 2006
Re: Software reverts to trial version
Reply #12 - Jun 23rd, 2020 at 2:02pm
Print Post  
It's re-mapping the version number that does not seem to work. However, we have now updated to version 6.6 and the error does not seem to have re-occurred.

DavidL
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint